@8wave/ai-elements 0.118.0 → 0.119.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/_chunks/{PkStreamingMarkdown--CcBvs19.js → PkStreamingMarkdown-Bry3y6Ru.js} +789 -780
  2. package/dist/_chunks/PkStreamingMarkdown-Bry3y6Ru.js.map +1 -0
  3. package/dist/_chunks/{PkToolShowArtifact-BVGN7hV2.js → PkToolShowArtifact-CfJLe8vD.js} +2 -2
  4. package/dist/_chunks/{PkToolShowArtifact-BVGN7hV2.js.map → PkToolShowArtifact-CfJLe8vD.js.map} +1 -1
  5. package/dist/_chunks/{PkToolShowContactForm-Blrwqpl0.js → PkToolShowContactForm-CQQ6p4bJ.js} +2 -2
  6. package/dist/_chunks/{PkToolShowContactForm-Blrwqpl0.js.map → PkToolShowContactForm-CQQ6p4bJ.js.map} +1 -1
  7. package/dist/_chunks/{PkToolShowForm-BpGHaN6x.js → PkToolShowForm-CGAc1O6K.js} +4 -4
  8. package/dist/_chunks/{PkToolShowForm-BpGHaN6x.js.map → PkToolShowForm-CGAc1O6K.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowSources-8c9RvGV1.js → PkToolShowSources-BJ-XFrLD.js} +3 -3
  10. package/dist/_chunks/{PkToolShowSources-8c9RvGV1.js.map → PkToolShowSources-BJ-XFrLD.js.map} +1 -1
  11. package/dist/_chunks/{markdown-c59ir6tw.js → markdown-DpoAzJSk.js} +64 -61
  12. package/dist/_chunks/markdown-DpoAzJSk.js.map +1 -0
  13. package/dist/ai-elements.es.js +1944 -1865
  14. package/dist/ai-elements.es.js.map +1 -1
  15. package/dist-vue/PkChatbot.js +1 -1
  16. package/dist-vue/PkChatbotEmptyState.js +1 -1
  17. package/dist-vue/PkChatbotInput.js +1 -1
  18. package/dist-vue/PkChatbotMessages.js +1 -1
  19. package/dist-vue/PkChatbotStepPayload.js +1 -1
  20. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  21. package/dist-vue/PkChatbotSteps.js +1 -1
  22. package/dist-vue/PkChatbotViewChat.js +1 -1
  23. package/dist-vue/PkChatbotViewFiles.js +1 -1
  24. package/dist-vue/PkChatbotViewProfile.js +1 -1
  25. package/dist-vue/_chunks/{Document-B-oyVh7v.js → Document-CV-RJu_p.js} +64 -61
  26. package/dist-vue/_chunks/Document-CV-RJu_p.js.map +1 -0
  27. package/dist-vue/_chunks/PkAvatar-BTqu8tn9.js +44 -0
  28. package/dist-vue/_chunks/PkAvatar-BTqu8tn9.js.map +1 -0
  29. package/dist-vue/_chunks/PkChatbot-CcNC2r_E.js +276 -0
  30. package/dist-vue/_chunks/PkChatbot-CcNC2r_E.js.map +1 -0
  31. package/dist-vue/_chunks/{PkChatbotEmptyState-D2dhInfG.js → PkChatbotEmptyState-Toj4CqXV.js} +3 -3
  32. package/dist-vue/_chunks/{PkChatbotEmptyState-D2dhInfG.js.map → PkChatbotEmptyState-Toj4CqXV.js.map} +1 -1
  33. package/dist-vue/_chunks/{PkChatbotInput-CQdxFbBR.js → PkChatbotInput-BfZqRpQ2.js} +2 -2
  34. package/dist-vue/_chunks/{PkChatbotInput-CQdxFbBR.js.map → PkChatbotInput-BfZqRpQ2.js.map} +1 -1
  35. package/dist-vue/_chunks/{PkChatbotMessages-coscJcpy.js → PkChatbotMessages-B6qYZsMZ.js} +283 -283
  36. package/dist-vue/_chunks/{PkChatbotMessages-coscJcpy.js.map → PkChatbotMessages-B6qYZsMZ.js.map} +1 -1
  37. package/dist-vue/_chunks/{PkChatbotStepPayload-DnqFluQZ.js → PkChatbotStepPayload-D0eoPBQ8.js} +2 -2
  38. package/dist-vue/_chunks/{PkChatbotStepPayload-DnqFluQZ.js.map → PkChatbotStepPayload-D0eoPBQ8.js.map} +1 -1
  39. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BMslY_BG.js → PkChatbotStepToolDetail-CMx4cw1D.js} +3 -3
  40. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BMslY_BG.js.map → PkChatbotStepToolDetail-CMx4cw1D.js.map} +1 -1
  41. package/dist-vue/_chunks/{PkChatbotSteps-7FT6Ju6_.js → PkChatbotSteps-DeZQhGRU.js} +38 -38
  42. package/dist-vue/_chunks/{PkChatbotSteps-7FT6Ju6_.js.map → PkChatbotSteps-DeZQhGRU.js.map} +1 -1
  43. package/dist-vue/_chunks/{PkChatbotViewChat-Cko-Cw6c.js → PkChatbotViewChat--Q90F_Kg.js} +7 -7
  44. package/dist-vue/_chunks/PkChatbotViewChat--Q90F_Kg.js.map +1 -0
  45. package/dist-vue/_chunks/{PkChatbotViewFiles-gqCumfod.js → PkChatbotViewFiles-CA20TBFY.js} +2 -2
  46. package/dist-vue/_chunks/{PkChatbotViewFiles-gqCumfod.js.map → PkChatbotViewFiles-CA20TBFY.js.map} +1 -1
  47. package/dist-vue/_chunks/{PkChatbotViewProfile-B57VRVaO.js → PkChatbotViewProfile-CyzRxE3D.js} +2 -2
  48. package/dist-vue/_chunks/{PkChatbotViewProfile-B57VRVaO.js.map → PkChatbotViewProfile-CyzRxE3D.js.map} +1 -1
  49. package/dist-vue/_chunks/{PkStreamingMarkdown-BtyWXY2k.js → PkStreamingMarkdown-C55Fi0Pd.js} +2 -2
  50. package/dist-vue/_chunks/{PkStreamingMarkdown-BtyWXY2k.js.map → PkStreamingMarkdown-C55Fi0Pd.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkToolShowArtifact-Ritx54_X.js → PkToolShowArtifact-z1qTnFkA.js} +2 -2
  52. package/dist-vue/_chunks/{PkToolShowArtifact-Ritx54_X.js.map → PkToolShowArtifact-z1qTnFkA.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkToolShowContactForm-D30IsZGy.js → PkToolShowContactForm-BjNpnv6y.js} +2 -2
  54. package/dist-vue/_chunks/{PkToolShowContactForm-D30IsZGy.js.map → PkToolShowContactForm-BjNpnv6y.js.map} +1 -1
  55. package/dist-vue/_chunks/{PkToolShowDiagram-PEozSAqU.js → PkToolShowDiagram-CqkabP0e.js} +2 -2
  56. package/dist-vue/_chunks/{PkToolShowDiagram-PEozSAqU.js.map → PkToolShowDiagram-CqkabP0e.js.map} +1 -1
  57. package/dist-vue/_chunks/{PkToolShowForm-ZmdM9J9x.js → PkToolShowForm-CZFWZub7.js} +5 -5
  58. package/dist-vue/_chunks/{PkToolShowForm-ZmdM9J9x.js.map → PkToolShowForm-CZFWZub7.js.map} +1 -1
  59. package/dist-vue/_chunks/{PkToolShowImageGallery-Dkjf7Tw_.js → PkToolShowImageGallery-CkfXP_lD.js} +2 -2
  60. package/dist-vue/_chunks/{PkToolShowImageGallery-Dkjf7Tw_.js.map → PkToolShowImageGallery-CkfXP_lD.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkToolShowProductList-CsHYM8vl.js → PkToolShowProductList-De-PtmD-.js} +2 -2
  62. package/dist-vue/_chunks/{PkToolShowProductList-CsHYM8vl.js.map → PkToolShowProductList-De-PtmD-.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkToolShowSources-CKZkcPLA.js → PkToolShowSources-CSN7S0zo.js} +3 -3
  64. package/dist-vue/_chunks/{PkToolShowSources-CKZkcPLA.js.map → PkToolShowSources-CSN7S0zo.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkToolShowVideo-CKm1fVQs.js → PkToolShowVideo-B_Q93E2y.js} +2 -2
  66. package/dist-vue/_chunks/{PkToolShowVideo-CKm1fVQs.js.map → PkToolShowVideo-B_Q93E2y.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkToolShowWebPages-DLEC9cuh.js → PkToolShowWebPages-D3CdjJUc.js} +2 -2
  68. package/dist-vue/_chunks/{PkToolShowWebPages-DLEC9cuh.js.map → PkToolShowWebPages-D3CdjJUc.js.map} +1 -1
  69. package/dist-vue/_chunks/{utils-fxHiCnzf.js → utils-CwIMEuAv.js} +41 -32
  70. package/dist-vue/_chunks/utils-CwIMEuAv.js.map +1 -0
  71. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +1 -4
  72. package/dist-vue/composables.js +188 -115
  73. package/dist-vue/composables.js.map +1 -1
  74. package/dist-vue/index.js +4005 -3980
  75. package/dist-vue/index.js.map +1 -1
  76. package/dist-vue/locales.js +4 -0
  77. package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +7 -0
  78. package/dist-vue/packages/components/src/chat/utils.d.ts +10 -0
  79. package/dist-vue/packages/models/src/schema/Document.d.ts +25 -0
  80. package/dist-vue/packages/models/src/schema/Notification.d.ts +2 -0
  81. package/dist-vue/packages/models/src/schema/Platform.d.ts +72 -0
  82. package/dist-vue/style.css +1 -1
  83. package/package.json +1 -1
  84. package/dist/_chunks/PkStreamingMarkdown--CcBvs19.js.map +0 -1
  85. package/dist/_chunks/markdown-c59ir6tw.js.map +0 -1
  86. package/dist-vue/_chunks/Document-B-oyVh7v.js.map +0 -1
  87. package/dist-vue/_chunks/PkAvatar-ZgCsoO-p.js +0 -42
  88. package/dist-vue/_chunks/PkAvatar-ZgCsoO-p.js.map +0 -1
  89. package/dist-vue/_chunks/PkChatbot-Cm45hwYw.js +0 -275
  90. package/dist-vue/_chunks/PkChatbot-Cm45hwYw.js.map +0 -1
  91. package/dist-vue/_chunks/PkChatbotViewChat-Cko-Cw6c.js.map +0 -1
  92. package/dist-vue/_chunks/utils-fxHiCnzf.js.map +0 -1
@@ -9,42 +9,42 @@ import { n as re } from "./useShortUrlResolver-qFJHKHwE.js";
9
9
  import { t as ie } from "./_plugin-vue_export-helper-B3ysoDQm.js";
10
10
  import { n as ae } from "./chatImagePolicy-DXkhb-N_.js";
11
11
  //#region ../../packages/utils/src/citations.ts
12
- var oe = /[ \t]*\uE200[^\uE201]*\uE201/g, se = /(?<![ \t])[ \t]*(?:cite|filecite|videocite|audiocite|imagecite|screenshot)(?:turn\d+[a-z]+\d+)+/gi, h = /[\uE200-\uE20F]/g;
13
- function ce(e) {
14
- return e && e.replace(oe, "").replace(se, "").replace(h, "");
12
+ var h = /[ \t]*\uE200[^\uE201]*\uE201/g, oe = /(?<![ \t])[ \t]*(?:cite|filecite|videocite|audiocite|imagecite|screenshot)(?:turn\d+[a-z]+\d+)+/gi, g = /[\uE200-\uE20F]/g;
13
+ function se(e) {
14
+ return e && e.replace(h, "").replace(oe, "").replace(g, "");
15
15
  }
16
16
  //#endregion
17
17
  //#region ../../packages/utils/src/message.ts
18
- function le(e) {
18
+ function ce(e) {
19
19
  return e ? e.type === "text" : !1;
20
20
  }
21
- function g(e) {
22
- return e ? e.type.startsWith("tool-") : !1;
23
- }
24
21
  function _(e) {
25
- return g(e) ? e.type.slice(5) : "";
22
+ return e ? e.type.startsWith("tool-") : !1;
26
23
  }
27
24
  function v(e) {
25
+ return _(e) ? e.type.slice(5) : "";
26
+ }
27
+ function y(e) {
28
28
  return e ? e.type === "file" : !1;
29
29
  }
30
- function ue(e) {
31
- if (!v(e)) return;
30
+ function le(e) {
31
+ if (!y(e)) return;
32
32
  let t = e.providerMetadata?.["8bot"]?.media;
33
33
  return t && typeof t == "object" && !Array.isArray(t) ? t : void 0;
34
34
  }
35
- function de(e) {
36
- if (!v(e)) return;
35
+ function ue(e) {
36
+ if (!y(e)) return;
37
37
  let t = e.providerMetadata?.["8bot"]?.transcript;
38
38
  return t && typeof t == "object" && !Array.isArray(t) ? t : void 0;
39
39
  }
40
- function fe(e, t) {
40
+ function de(e, t) {
41
41
  return e.map((e) => {
42
42
  let n = t.filter((t) => t.messageId === e.id);
43
43
  return n.length === 0 ? e : {
44
44
  ...e,
45
45
  parts: e.parts.map((e) => {
46
- let t = n.find(({ storedFileName: t }) => t === ue(e)?.storedFileName);
47
- return t && v(e) ? {
46
+ let t = n.find(({ storedFileName: t }) => t === le(e)?.storedFileName);
47
+ return t && y(e) ? {
48
48
  ...e,
49
49
  providerMetadata: {
50
50
  ...e.providerMetadata,
@@ -58,54 +58,54 @@ function fe(e, t) {
58
58
  };
59
59
  });
60
60
  }
61
- function pe(e) {
61
+ function fe(e) {
62
62
  return e ? e.type === "reasoning" : !1;
63
63
  }
64
- function me(e) {
64
+ function pe(e) {
65
65
  if (!e) return;
66
66
  let t = e.parts;
67
- if (Array.isArray(t)) return t.find((e) => le(e))?.text;
67
+ if (Array.isArray(t)) return t.find((e) => ce(e))?.text;
68
68
  }
69
69
  //#endregion
70
70
  //#region ../../packages/components/src/chat/utils.ts
71
- function he(e) {
71
+ function me(e) {
72
72
  let t = [];
73
73
  for (let n of e) {
74
- if (!le(n)) {
74
+ if (!ce(n)) {
75
75
  t.push(n);
76
76
  continue;
77
77
  }
78
78
  let e = t[t.length - 1];
79
- e && le(e) ? t[t.length - 1] = {
79
+ e && ce(e) ? t[t.length - 1] = {
80
80
  ...e,
81
81
  text: e.text + n.text
82
82
  } : t.push(n);
83
83
  }
84
84
  return t;
85
85
  }
86
- var y = (e) => g(e) && m(_(e));
87
- function ge(e) {
86
+ var b = (e) => _(e) && m(v(e));
87
+ function he(e) {
88
88
  let t = /* @__PURE__ */ new Map();
89
- for (let [n, r] of e.entries()) y(r) && r.state !== "output-error" && !be(r) && t.set(r.type, n);
90
- return e.filter((e, n) => !(y(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
89
+ for (let [n, r] of e.entries()) b(r) && r.state !== "output-error" && !ye(r) && t.set(r.type, n);
90
+ return e.filter((e, n) => !(b(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
91
91
  }
92
- var _e = /* @__PURE__ */ new Set(["tool-editSpreadsheet"]);
93
- function ve(e) {
94
- let t = e.filter((e) => _e.has(e.type));
95
- return t.length > 0 ? [...e.filter((e) => !_e.has(e.type)), ...t] : e;
92
+ var ge = /* @__PURE__ */ new Set(["tool-editSpreadsheet"]);
93
+ function _e(e) {
94
+ let t = e.filter((e) => ge.has(e.type));
95
+ return t.length > 0 ? [...e.filter((e) => !ge.has(e.type)), ...t] : e;
96
96
  }
97
- function ye(e, t) {
97
+ function ve(e, t) {
98
98
  let n = e.toolCallId;
99
- return _e.has(e.type) && n ? `file-${n}` : t;
99
+ return ge.has(e.type) && n ? `file-${n}` : t;
100
100
  }
101
- function be(e) {
101
+ function ye(e) {
102
102
  return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
103
103
  }
104
- var xe = 4e3, b = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
105
- function Se(e, t) {
104
+ var be = 4e3, x = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
105
+ function xe(e, t) {
106
106
  if (e.length <= t) return e;
107
107
  let n = e.length - t, r = n + t / 2, i = (e, t) => e !== -1 && e < r ? e + t : void 0, a = i(e.indexOf("\n\n", n), 2) ?? i(e.indexOf("\n", n), 1) ?? n, o;
108
- for (let t of e.matchAll(b)) {
108
+ for (let t of e.matchAll(x)) {
109
109
  if (t.index >= a) break;
110
110
  let [, e, n] = t;
111
111
  if (o) e[0] === o[0] && e.length >= o.length && !n.trim() && (o = void 0);
@@ -116,40 +116,49 @@ function Se(e, t) {
116
116
  }
117
117
  return `…\n\n${o ? `${o}\n` : ""}${e.slice(a)}`;
118
118
  }
119
- var Ce = /* @__PURE__ */ new Set([
119
+ var Se = /* @__PURE__ */ new Set([
120
120
  "approval-requested",
121
121
  "approval-responded",
122
122
  "output-denied"
123
123
  ]);
124
- function we(e) {
125
- return g(e) ? Ce.has(e.state) ? !0 : e.approval != null : !1;
124
+ function Ce(e) {
125
+ return _(e) ? Se.has(e.state) ? !0 : e.approval != null : !1;
126
+ }
127
+ var we = "requestConfirm";
128
+ function Te(e) {
129
+ return _(e) && e.type === "tool-requestConfirm";
126
130
  }
127
- var Te = "requestConfirm";
128
131
  function Ee(e) {
129
- return g(e) && e.type === "tool-requestConfirm";
132
+ return Ce(e) || Te(e);
130
133
  }
131
134
  function De(e) {
132
- return we(e) || Ee(e);
135
+ if (_(e)) return e.approval?.id;
133
136
  }
134
137
  function Oe(e) {
135
- if (g(e)) return e.approval?.id;
136
- }
137
- function ke(e) {
138
138
  if (e && "state" in e) return e.state;
139
139
  }
140
- function Ae(e = "000000") {
140
+ function ke(e = "000000") {
141
141
  let t = e.replace("#", "");
142
142
  t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
143
143
  let n = parseInt(t.substring(0, 2), 16) / 255, r = parseInt(t.substring(2, 4), 16) / 255, i = parseInt(t.substring(4, 6), 16) / 255, a = (e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
144
144
  return .2126 * a(n) + .7152 * a(r) + .0722 * a(i) > .179 ? "black" : "white";
145
145
  }
146
- function x(e, t) {
147
- return e === "white" || e === "black" ? e : Ae(t);
146
+ function S(e, t) {
147
+ return e === "white" || e === "black" ? e : ke(t);
148
148
  }
149
- function je(e, t) {
149
+ function Ae(e, t) {
150
+ if (e) return {
151
+ "--chatbot-main-color": e,
152
+ "--chatbot-contrast-color": t,
153
+ "--color-brand": e,
154
+ "--color-brand-contrast": t,
155
+ "--input-focus-color": "var(--color-brand-graphic)"
156
+ };
157
+ }
158
+ function C(e, t) {
150
159
  if (!(t === void 0 || t < 50)) return e(t / 1e3, "seconds");
151
160
  }
152
- function S(e) {
161
+ function je(e) {
153
162
  if (e !== void 0) {
154
163
  if (typeof e == "string") return e.trim() || void 0;
155
164
  try {
@@ -160,10 +169,10 @@ function S(e) {
160
169
  }
161
170
  }
162
171
  }
163
- function Me(e) {
164
- return S(e) !== void 0;
172
+ function w(e) {
173
+ return je(e) !== void 0;
165
174
  }
166
- function C(e, t) {
175
+ function Me(e, t) {
167
176
  let n = e?.input;
168
177
  if (typeof t == "string") {
169
178
  let e = n?.question ?? n?.steps?.[0]?.question;
@@ -198,12 +207,12 @@ function Pe(e, t) {
198
207
  for (let [e, n] of Object.entries(t)) n !== void 0 && r(e, n);
199
208
  return n;
200
209
  }
201
- var w = [
210
+ var Fe = [
202
211
  "tool-perplexity_search",
203
212
  "tool-parallel_search",
204
213
  "tool-web_search",
205
214
  "tool-google_search"
206
- ], Fe = /* @__PURE__ */ new Set([
215
+ ], Ie = /* @__PURE__ */ new Set([
207
216
  "tool-searchInKnowledgeBase",
208
217
  "tool-retrieveRevisedAnswers",
209
218
  "tool-expandChunkContext",
@@ -212,21 +221,21 @@ var w = [
212
221
  "tool-geocode",
213
222
  "tool-recallUserMemory",
214
223
  "tool-saveUserMemory",
215
- ...w
224
+ ...Fe
216
225
  ]);
217
- function Ie(e) {
218
- return g(e) && Fe.has(e.type);
226
+ function Le(e) {
227
+ return _(e) && Ie.has(e.type);
219
228
  }
220
- var Le = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, T = (e, ...t) => {
229
+ var Re = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, T = (e, ...t) => {
221
230
  for (let n of t) {
222
231
  let t = e?.[n];
223
232
  if (typeof t == "string" && t.trim()) return t;
224
233
  }
225
234
  };
226
- function E(e) {
227
- if (!g(e)) return;
228
- let t = Le("input" in e ? e.input : void 0), n = Le("output" in e ? e.output : void 0);
229
- if (e.type === "tool-searchInKnowledgeBase" || w.includes(e.type)) {
235
+ function ze(e) {
236
+ if (!_(e)) return;
237
+ let t = Re("input" in e ? e.input : void 0), n = Re("output" in e ? e.output : void 0);
238
+ if (e.type === "tool-searchInKnowledgeBase" || Fe.includes(e.type)) {
230
239
  let e = t?.queries;
231
240
  if (Array.isArray(e)) {
232
241
  let t = e.filter((e) => typeof e == "string" && !!e.trim());
@@ -248,42 +257,42 @@ function E(e) {
248
257
  if (e.type === "tool-recallUserMemory") return T(t, "query");
249
258
  if (e.type === "tool-saveUserMemory") return T(t, "content", "query");
250
259
  }
251
- function Re(e) {
252
- if (g(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-scheduleWakeup" ? "ri:alarm-line" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-readEarlierMessages" ? "ri:history-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-perplexity_search" || e.type === "tool-parallel_search" || e.type === "tool-web_search" || e.type === "tool-google_search" ? "ri:global-line" : "ri:tools-line";
253
- if (pe(e)) return "ri:lightbulb-line";
254
- if (le(e)) return "ri:double-quotes-r";
260
+ function Be(e) {
261
+ if (_(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-scheduleWakeup" ? "ri:alarm-line" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-readEarlierMessages" ? "ri:history-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-requestAccountLink" ? "ri:link" : e.type === "tool-unlinkAccount" ? "ri:link-unlink" : e.type === "tool-perplexity_search" || e.type === "tool-parallel_search" || e.type === "tool-web_search" || e.type === "tool-google_search" ? "ri:global-line" : "ri:tools-line";
262
+ if (fe(e)) return "ri:lightbulb-line";
263
+ if (ce(e)) return "ri:double-quotes-r";
255
264
  }
256
- function ze(e, t) {
257
- return g(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-readEarlierMessages" ? e("messagePart.readEarlierMessages") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : w.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : pe(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
265
+ function Ve(e, t) {
266
+ return _(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-readEarlierMessages" ? e("messagePart.readEarlierMessages") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : t.type === "tool-requestAccountLink" ? e("messagePart.requestAccountLink") : t.type === "tool-unlinkAccount" ? e("messagePart.unlinkAccount") : Fe.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : fe(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
258
267
  }
259
268
  //#endregion
260
269
  //#region ../../node_modules/.pnpm/remend@1.4.0/node_modules/remend/dist/index.js
261
- var Be = Object.defineProperty, Ve = Object.defineProperties, He = Object.getOwnPropertyDescriptors, Ue = Object.getOwnPropertySymbols, We = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable, Ke = (e, t, n) => t in e ? Be(e, t, {
270
+ var He = Object.defineProperty, Ue = Object.defineProperties, We = Object.getOwnPropertyDescriptors, Ge = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, qe = Object.prototype.propertyIsEnumerable, Je = (e, t, n) => t in e ? He(e, t, {
262
271
  enumerable: !0,
263
272
  configurable: !0,
264
273
  writable: !0,
265
274
  value: n
266
- }) : e[t] = n, qe = (e, t) => {
267
- for (var n in t ||= {}) We.call(t, n) && Ke(e, n, t[n]);
268
- if (Ue) for (var n of Ue(t)) Ge.call(t, n) && Ke(e, n, t[n]);
275
+ }) : e[t] = n, Ye = (e, t) => {
276
+ for (var n in t ||= {}) Ke.call(t, n) && Je(e, n, t[n]);
277
+ if (Ge) for (var n of Ge(t)) qe.call(t, n) && Je(e, n, t[n]);
269
278
  return e;
270
- }, Je = (e, t) => Ve(e, He(t)), D = {
279
+ }, Xe = (e, t) => Ue(e, We(t)), E = {
271
280
  PROSE: 0,
272
281
  FENCE_MARKER: 1,
273
282
  FENCE_INFO: 2,
274
283
  FENCE_BODY: 3,
275
284
  CODE_SPAN: 4,
276
285
  CODE_SPAN_OPEN: 5
277
- }, Ye = /^(`{3,}|~{3,})(.*)$/, Xe = (e) => e !== void 0 && e >= "0" && e <= "9", Ze = (e, t) => {
286
+ }, Ze = /^(`{3,}|~{3,})(.*)$/, Qe = (e) => e !== void 0 && e >= "0" && e <= "9", $e = (e, t) => {
278
287
  let n = t;
279
288
  if (e[n] === "-" || e[n] === "*" || e[n] === "+") n += 1;
280
289
  else {
281
- for (; Xe(e[n]) && n - t < 9;) n += 1;
290
+ for (; Qe(e[n]) && n - t < 9;) n += 1;
282
291
  if (n === t || e[n] !== "." && e[n] !== ")") return -1;
283
292
  n += 1;
284
293
  }
285
294
  return e[n] === " " ? n + 1 : -1;
286
- }, Qe = (e, t, n) => {
295
+ }, et = (e, t, n) => {
287
296
  let r = 0, i = t, a = !1, o = t;
288
297
  for (;;) {
289
298
  for (; o < n && e[o] === " ";) o += 1;
@@ -291,7 +300,7 @@ var Be = Object.defineProperty, Ve = Object.defineProperties, He = Object.getOwn
291
300
  r += 1, o += e[o + 1] === " " ? 2 : 1, i = o, a = !1;
292
301
  continue;
293
302
  }
294
- let t = o < n ? Ze(e, o) : -1;
303
+ let t = o < n ? $e(e, o) : -1;
295
304
  if (t === -1) return {
296
305
  contentStart: o,
297
306
  listIndent: a ? o - i : 0,
@@ -299,7 +308,7 @@ var Be = Object.defineProperty, Ve = Object.defineProperties, He = Object.getOwn
299
308
  };
300
309
  o = t, a = !0;
301
310
  }
302
- }, $e = (e, t, n, r) => {
311
+ }, tt = (e, t, n, r) => {
303
312
  let i = t;
304
313
  for (let t = 0; t < r; t += 1) {
305
314
  for (; i < n && e[i] === " ";) i += 1;
@@ -307,10 +316,10 @@ var Be = Object.defineProperty, Ve = Object.defineProperties, He = Object.getOwn
307
316
  i += 1, e[i] === " " && (i += 1);
308
317
  }
309
318
  return i;
310
- }, et = (e, t, n, r, i) => {
319
+ }, nt = (e, t, n, r, i) => {
311
320
  let a = t + r;
312
- e.fill(D.FENCE_MARKER, a, a + i), e.fill(D.FENCE_INFO, a + i, Math.min(n + 1, e.length));
313
- }, tt = (e, t, n, r) => {
321
+ e.fill(E.FENCE_MARKER, a, a + i), e.fill(E.FENCE_INFO, a + i, Math.min(n + 1, e.length));
322
+ }, rt = (e, t, n, r) => {
314
323
  let i = t;
315
324
  for (; i < n && e[i] === " ";) i += 1;
316
325
  let a = 0;
@@ -321,62 +330,62 @@ var Be = Object.defineProperty, Ve = Object.defineProperties, He = Object.getOwn
321
330
  i += 1;
322
331
  }
323
332
  return !0;
324
- }, nt = (e, t, n, r) => {
325
- let i = r > n && e[r - 1] === "\r" ? r - 1 : r, a = Qe(e, n, i), o = e.slice(a.contentStart, i).match(Ye);
333
+ }, it = (e, t, n, r) => {
334
+ let i = r > n && e[r - 1] === "\r" ? r - 1 : r, a = et(e, n, i), o = e.slice(a.contentStart, i).match(Ze);
326
335
  if (!o) return null;
327
336
  let [, s, c] = o, l = s[0];
328
- return l === "`" && c.includes("`") ? null : (et(t, n, r, a.contentStart - n, s.length), {
337
+ return l === "`" && c.includes("`") ? null : (nt(t, n, r, a.contentStart - n, s.length), {
329
338
  char: l,
330
339
  length: s.length,
331
340
  listIndent: a.listIndent,
332
341
  quoteDepth: a.quoteDepth
333
342
  });
334
- }, rt = (e, t, n, r) => {
335
- let i = $e(e, t, n, r.quoteDepth);
343
+ }, at = (e, t, n, r) => {
344
+ let i = tt(e, t, n, r.quoteDepth);
336
345
  if (i === -1 || r.listIndent === 0) return i;
337
346
  let a = i;
338
347
  for (; a < n && e[a] === " ";) a += 1;
339
348
  return a === n || e[a] === "\r" && a + 1 === n || a - i >= r.listIndent ? i : -1;
340
- }, it = (e, t) => {
349
+ }, ot = (e, t) => {
341
350
  let n = e.length, r = null, i = 0;
342
351
  for (; i < n;) {
343
352
  let a = e.indexOf("\n", i);
344
353
  a === -1 && (a = n);
345
- let o = r ? rt(e, i, a, r) : -1;
346
- r && o === -1 && (r = null), r ? tt(e, o, a, r) ? (t.fill(D.FENCE_MARKER, i, a), r = null) : t.fill(D.FENCE_BODY, i, Math.min(a + 1, n)) : r = nt(e, t, i, a), i = a + 1;
354
+ let o = r ? at(e, i, a, r) : -1;
355
+ r && o === -1 && (r = null), r ? rt(e, o, a, r) ? (t.fill(E.FENCE_MARKER, i, a), r = null) : t.fill(E.FENCE_BODY, i, Math.min(a + 1, n)) : r = it(e, t, i, a), i = a + 1;
347
356
  }
348
357
  return r;
349
- }, at = (e, t) => {
358
+ }, st = (e, t) => {
350
359
  let n = t + 1;
351
360
  for (; n < e.length && e[n] === "`";) n += 1;
352
361
  return n;
353
- }, ot = (e, t) => {
362
+ }, D = (e, t) => {
354
363
  let n = t + 1;
355
364
  for (; n < e.length && (e[n] === " " || e[n] === " " || e[n] === "\r");) n += 1;
356
365
  return n < e.length && e[n] === "\n";
357
- }, O = (e, t, n) => {
366
+ }, ct = (e, t, n) => {
358
367
  let r = n;
359
368
  for (;;) {
360
369
  let n = e.indexOf("`", r);
361
370
  if (n === -1) return -1;
362
- let i = n > r && e[n - 1] === "\\" && t[n - 1] === D.PROSE;
363
- if (t[n] === D.PROSE && !i) return n;
371
+ let i = n > r && e[n - 1] === "\\" && t[n - 1] === E.PROSE;
372
+ if (t[n] === E.PROSE && !i) return n;
364
373
  r = n + 1;
365
374
  }
366
- }, st = (e, t) => {
375
+ }, lt = (e, t) => {
367
376
  let n = e.length, r = -1, i = 0, a = 0;
368
377
  for (; a < n;) {
369
378
  if (r < 0) {
370
- if (a = O(e, t, a), a === -1) break;
371
- let n = at(e, a);
379
+ if (a = ct(e, t, a), a === -1) break;
380
+ let n = st(e, a);
372
381
  r = a, i = n - a, a = n;
373
382
  continue;
374
383
  }
375
- if (t[a] !== D.PROSE) {
376
- t.fill(D.CODE_SPAN_OPEN, r, a), r = -1, a += 1;
384
+ if (t[a] !== E.PROSE) {
385
+ t.fill(E.CODE_SPAN_OPEN, r, a), r = -1, a += 1;
377
386
  continue;
378
387
  }
379
- if (e[a] === "\n" && ot(e, a)) {
388
+ if (e[a] === "\n" && D(e, a)) {
380
389
  r = -1, a += 1;
381
390
  continue;
382
391
  }
@@ -384,79 +393,79 @@ var Be = Object.defineProperty, Ve = Object.defineProperties, He = Object.getOwn
384
393
  a += 1;
385
394
  continue;
386
395
  }
387
- let n = at(e, a);
388
- n - a === i && (t.fill(D.CODE_SPAN, r, n), r = -1), a = n;
396
+ let n = st(e, a);
397
+ n - a === i && (t.fill(E.CODE_SPAN, r, n), r = -1), a = n;
389
398
  }
390
- return r >= 0 ? (t.fill(D.CODE_SPAN_OPEN, r, n), {
399
+ return r >= 0 ? (t.fill(E.CODE_SPAN_OPEN, r, n), {
391
400
  start: r,
392
401
  runLength: i
393
402
  }) : null;
394
- }, ct = (e) => {
403
+ }, ut = (e) => {
395
404
  let t = new Uint8Array(e.length);
396
405
  return {
397
406
  text: e,
398
407
  regions: t,
399
- openFence: it(e, t),
400
- openSpan: st(e, t),
408
+ openFence: ot(e, t),
409
+ openSpan: lt(e, t),
401
410
  mathMask: null,
402
411
  linkUrlMask: null,
403
412
  htmlTagMask: null
404
413
  };
405
- }, lt = null, ut = null, k = (e) => {
406
- if (ut !== null && e === lt) return ut;
407
- let t = ct(e);
408
- return lt = e, ut = t, t;
409
- }, dt = () => {
410
- lt = null, ut = null;
411
- }, ft = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !== D.PROSE, pt = (e, t) => e.regions[t] === D.CODE_SPAN, mt = (e, t) => {
412
- let n = k(e), r = t + t, i = 0;
413
- for (let t = e.indexOf(r); t !== -1; t = e.indexOf(r, t)) n.regions[t] === D.PROSE ? (i += 1, t += 2) : t += 1;
414
+ }, dt = null, ft = null, O = (e) => {
415
+ if (ft !== null && e === dt) return ft;
416
+ let t = ut(e);
417
+ return dt = e, ft = t, t;
418
+ }, pt = () => {
419
+ dt = null, ft = null;
420
+ }, mt = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !== E.PROSE, ht = (e, t) => e.regions[t] === E.CODE_SPAN, gt = (e, t) => {
421
+ let n = O(e), r = t + t, i = 0;
422
+ for (let t = e.indexOf(r); t !== -1; t = e.indexOf(r, t)) n.regions[t] === E.PROSE ? (i += 1, t += 2) : t += 1;
414
423
  return i;
415
- }, ht = /* @__PURE__ */ new Uint8Array(), gt = (e) => e === "inlineLatex" || e === "blockLatex", A = (e, t) => t === "[" && e === "none" ? "blockLatex" : t === "]" && e === "blockLatex" ? "none" : t === "(" && e === "none" ? "inlineLatex" : t === ")" && e === "inlineLatex" ? "none" : null, _t = (e, t) => t ? e === "blockDollar" ? "none" : "blockDollar" : e === "blockDollar" ? e : e === "inlineDollar" ? "none" : "inlineDollar", vt = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), yt = (e, t, n) => {
424
+ }, _t = /* @__PURE__ */ new Uint8Array(), k = (e) => e === "inlineLatex" || e === "blockLatex", vt = (e, t) => t === "[" && e === "none" ? "blockLatex" : t === "]" && e === "blockLatex" ? "none" : t === "(" && e === "none" ? "inlineLatex" : t === ")" && e === "inlineLatex" ? "none" : null, yt = (e, t) => t ? e === "blockDollar" ? "none" : "blockDollar" : e === "blockDollar" ? e : e === "inlineDollar" ? "none" : "inlineDollar", bt = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), xt = (e, t, n) => {
416
425
  let r = e[t + 1];
417
426
  if (e[t] === "\\") {
418
427
  if (r === "$") return {
419
428
  context: n,
420
429
  length: 2
421
430
  };
422
- let e = A(n, r);
431
+ let e = vt(n, r);
423
432
  return e === null ? null : {
424
433
  context: e,
425
434
  length: 2
426
435
  };
427
436
  }
428
- if (e[t] === "$" && !gt(n)) {
437
+ if (e[t] === "$" && !k(n)) {
429
438
  let e = r === "$";
430
439
  return {
431
- context: _t(n, e),
440
+ context: yt(n, e),
432
441
  length: e ? 2 : 1
433
442
  };
434
443
  }
435
444
  return null;
436
- }, bt = (e) => {
445
+ }, St = (e) => {
437
446
  let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = "none", o = 0;
438
447
  for (; o < r;) {
439
448
  i[o] = a === "none" ? 0 : 1;
440
- let e = n[o] === D.PROSE ? yt(t, o, a) : null;
449
+ let e = n[o] === E.PROSE ? xt(t, o, a) : null;
441
450
  e === null ? o += 1 : (a = e.context, e.length === 2 && (i[o + 1] = a === "none" ? 0 : 1), o += e.length);
442
451
  }
443
452
  return i;
444
- }, xt = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask = vt(e.text) ? bt(e) : ht), e.mathMask[t] === 1), St = (e, t, n, r) => {
453
+ }, Ct = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask = bt(e.text) ? St(e) : _t), e.mathMask[t] === 1), wt = (e, t, n, r) => {
445
454
  let { text: i, regions: a } = e, o = new Uint8Array(n - t), s = 0;
446
- for (let e = n - 1; e >= t; --e) i[e] === ")" && a[e] === D.PROSE && (s = 1), o[e - t] = s;
455
+ for (let e = n - 1; e >= t; --e) i[e] === ")" && a[e] === E.PROSE && (s = 1), o[e - t] = s;
447
456
  let c = !1;
448
- for (let e = t; e < n; e += 1) c && o[e - t] === 1 && (r[e] = 1), a[e] === D.PROSE && (i[e] === ")" ? c = !1 : i[e] === "(" && (c = e > 0 && i[e - 1] === "]"));
449
- }, Ct = (e) => {
457
+ for (let e = t; e < n; e += 1) c && o[e - t] === 1 && (r[e] = 1), a[e] === E.PROSE && (i[e] === ")" ? c = !1 : i[e] === "(" && (c = e > 0 && i[e - 1] === "]"));
458
+ }, Tt = (e) => {
450
459
  let { text: t } = e, n = t.length, r = new Uint8Array(n), i = 0;
451
460
  for (; i < n;) {
452
461
  let a = t.indexOf("\n", i);
453
- a === -1 && (a = n), St(e, i, a, r), i = a + 1;
462
+ a === -1 && (a = n), wt(e, i, a, r), i = a + 1;
454
463
  }
455
464
  return r;
456
- }, wt = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.linkUrlMask === null && (e.linkUrlMask = e.text.includes("](") ? Ct(e) : ht), e.linkUrlMask[t] === 1), Tt = (e) => {
465
+ }, Et = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.linkUrlMask === null && (e.linkUrlMask = e.text.includes("](") ? Tt(e) : _t), e.linkUrlMask[t] === 1), Dt = (e) => {
457
466
  let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = !1;
458
467
  for (let e = 0; e < r; e += 1) if (t[e] === "\n") a = !1;
459
- else if (i[e] = +!!a, n[e] === D.PROSE) {
468
+ else if (i[e] = +!!a, n[e] === E.PROSE) {
460
469
  if (t[e] === ">") a = !1;
461
470
  else if (t[e] === "<") {
462
471
  let n = t[e + 1];
@@ -464,56 +473,56 @@ var Be = Object.defineProperty, Ve = Object.defineProperties, He = Object.getOwn
464
473
  }
465
474
  }
466
475
  return i;
467
- }, Et = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.htmlTagMask === null && (e.htmlTagMask = e.text.includes("<") ? Tt(e) : ht), e.htmlTagMask[t] === 1), j = (e, t) => ft(k(e), t), M = (e, t) => pt(k(e), t), Dt = /^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm, Ot = (e) => !e || typeof e != "string" || !e.includes(">") ? e : e.replace(Dt, (t, n, r, i) => j(e, i) ? t : `${n}\\>${r}`), N = (e, { delimiter: t, markerLength: n, regex: r }) => {
476
+ }, A = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.htmlTagMask === null && (e.htmlTagMask = e.text.includes("<") ? Dt(e) : _t), e.htmlTagMask[t] === 1), j = (e, t) => mt(O(e), t), M = (e, t) => ht(O(e), t), Ot = /^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm, kt = (e) => !e || typeof e != "string" || !e.includes(">") ? e : e.replace(Ot, (t, n, r, i) => j(e, i) ? t : `${n}\\>${r}`), N = (e, { delimiter: t, markerLength: n, regex: r }) => {
468
477
  let i = e.lastIndexOf(t, e.length - 2), a = i === -1 ? e.length - 1 : i;
469
478
  return e.slice(Math.max(0, a - n + 1)).match(r);
470
- }, kt = {
479
+ }, At = {
471
480
  delimiter: "*",
472
481
  markerLength: 2,
473
482
  regex: /(\*\*)([^*]*\*?)$/
474
- }, At = {
483
+ }, jt = {
475
484
  delimiter: "_",
476
485
  markerLength: 2,
477
486
  regex: /(__)([^_]*?)$/
478
- }, jt = {
487
+ }, Mt = {
479
488
  delimiter: "*",
480
489
  markerLength: 3,
481
490
  regex: /(\*\*\*)([^*]*?)$/
482
- }, Mt = {
491
+ }, Nt = {
483
492
  delimiter: "*",
484
493
  markerLength: 1,
485
494
  regex: /(\*)([^*]*?)$/
486
- }, Nt = {
495
+ }, Pt = {
487
496
  delimiter: "_",
488
497
  markerLength: 1,
489
498
  regex: /(_)([^_]*?)$/
490
- }, Pt = {
499
+ }, Ft = {
491
500
  delimiter: "~",
492
501
  markerLength: 2,
493
502
  regex: /(~~)([^~]*?)$/
494
- }, Ft = {
503
+ }, It = {
495
504
  delimiter: "_",
496
505
  markerLength: 2,
497
506
  regex: /(__)([^_]+)_$/
498
- }, It = {
507
+ }, Lt = {
499
508
  delimiter: "~",
500
509
  markerLength: 2,
501
510
  regex: /(~~)([^~]+)~$/
502
- }, Lt = /^[\s_~*`]*$/, Rt = /^[\s]*[-*+][\s]+$/, zt = /[\p{L}\p{N}_]/u, Bt = /^\*{4,}$/, P = (e) => {
511
+ }, Rt = /^[\s_~*`]*$/, zt = /^[\s]*[-*+][\s]+$/, Bt = /[\p{L}\p{N}_]/u, Vt = /^\*{4,}$/, P = (e) => {
503
512
  if (!e) return !1;
504
513
  let t = e.charCodeAt(0);
505
- return t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 95 || zt.test(e);
506
- }, Vt = (e, t) => {
514
+ return t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 95 || Bt.test(e);
515
+ }, Ht = (e, t) => {
507
516
  let n = 1;
508
517
  for (let r = t - 1; r >= 0; --r) if (e[r] === "]") n += 1;
509
518
  else if (e[r] === "[" && (--n, n === 0)) return r;
510
519
  return -1;
511
- }, Ht = (e, t) => {
520
+ }, Ut = (e, t) => {
512
521
  let n = 1;
513
522
  for (let r = t + 1; r < e.length; r += 1) if (e[r] === "[") n += 1;
514
523
  else if (e[r] === "]" && (--n, n === 0)) return r;
515
524
  return -1;
516
- }, Ut = (e, t) => xt(k(e), t), F = (e, t, n) => {
525
+ }, F = (e, t) => Ct(O(e), t), Wt = (e, t, n) => {
517
526
  let r = 0;
518
527
  for (let n = t - 1; n >= 0; --n) if (e[n] === "\n") {
519
528
  r = n + 1;
@@ -531,184 +540,184 @@ var Be = Object.defineProperty, Ve = Object.defineProperties, He = Object.getOwn
531
540
  break;
532
541
  }
533
542
  return o >= 3 && !s;
534
- }, Wt = (e, t, n, r) => n === "\\" || xt(e, t) ? !0 : n !== "*" && r === "*" ? (t < e.text.length - 2 ? e.text[t + 2] : "") !== "*" : n === "*" || (!n || n === " " || n === " " || n === "\n") && (!r || r === " " || r === " " || r === "\n"), I = (e) => e === " " || e === " " || e === "\n", Gt = (e, t) => !!(e && t && P(e) && P(t)), Kt = (e, t, n, r) => {
535
- let i = Gt(e, t), a = !!t && !I(t), o = !!e && !I(e);
543
+ }, I = (e, t, n, r) => n === "\\" || Ct(e, t) ? !0 : n !== "*" && r === "*" ? (t < e.text.length - 2 ? e.text[t + 2] : "") !== "*" : n === "*" || (!n || n === " " || n === " " || n === "\n") && (!r || r === " " || r === " " || r === "\n"), Gt = (e) => e === " " || e === " " || e === "\n", Kt = (e, t) => !!(e && t && P(e) && P(t)), qt = (e, t, n, r) => {
544
+ let i = Kt(e, t), a = !!t && !Gt(t), o = !!e && !Gt(e);
536
545
  return i && n % 2 == 0 && !r ? { count: !1 } : o && n % 2 == 1 || a ? {
537
546
  count: !0,
538
547
  inWordAsteriskChain: i
539
548
  } : { count: !1 };
540
- }, qt = (e) => {
541
- let t = k(e), n = 0, r = !1, i = e.length;
549
+ }, Jt = (e) => {
550
+ let t = O(e), n = 0, r = !1, i = e.length;
542
551
  for (let a = 0; a < i; a += 1) {
543
- if (e[a] !== "*" || t.regions[a] !== D.PROSE) {
552
+ if (e[a] !== "*" || t.regions[a] !== E.PROSE) {
544
553
  P(e[a]) || (r = !1);
545
554
  continue;
546
555
  }
547
556
  let o = a > 0 ? e[a - 1] : "", s = a < i - 1 ? e[a + 1] : "";
548
- if (Wt(t, a, o, s)) continue;
549
- let c = Kt(o, s, n, r);
557
+ if (I(t, a, o, s)) continue;
558
+ let c = qt(o, s, n, r);
550
559
  c.count && (n += 1, r = c.inWordAsteriskChain);
551
560
  }
552
561
  return n;
553
- }, Jt = (e, t, n, r) => !!(n === "\\" || xt(e, t) || wt(e, t) || Et(e, t) || n === "_" || r === "_" || n && r && P(n) && P(r)), Yt = (e) => {
554
- let t = k(e), n = 0, r = e.length;
562
+ }, Yt = (e, t, n, r) => !!(n === "\\" || Ct(e, t) || Et(e, t) || A(e, t) || n === "_" || r === "_" || n && r && P(n) && P(r)), Xt = (e) => {
563
+ let t = O(e), n = 0, r = e.length;
555
564
  for (let i = 0; i < r; i += 1) {
556
- if (e[i] !== "_" || t.regions[i] !== D.PROSE) continue;
565
+ if (e[i] !== "_" || t.regions[i] !== E.PROSE) continue;
557
566
  let a = i > 0 ? e[i - 1] : "", o = i < r - 1 ? e[i + 1] : "";
558
- Jt(t, i, a, o) || (n += 1);
567
+ Yt(t, i, a, o) || (n += 1);
559
568
  }
560
569
  return n;
561
- }, Xt = (e) => {
562
- let t = k(e), n = 0, r = 0;
563
- for (let i = 0; i < e.length; i += 1) e[i] === "*" && t.regions[i] === D.PROSE ? r += 1 : (r >= 3 && (n += Math.floor(r / 3)), r = 0);
570
+ }, Zt = (e) => {
571
+ let t = O(e), n = 0, r = 0;
572
+ for (let i = 0; i < e.length; i += 1) e[i] === "*" && t.regions[i] === E.PROSE ? r += 1 : (r >= 3 && (n += Math.floor(r / 3)), r = 0);
564
573
  return r >= 3 && (n += Math.floor(r / 3)), n;
565
- }, Zt = (e) => mt(e, "*"), Qt = (e) => e === "" || e === " " || e === " " || e === "\n", $t = (e, t, n, r, i) => {
566
- if (!(Qt(n) && Qt(r))) return !1;
574
+ }, Qt = (e) => gt(e, "*"), $t = (e) => e === "" || e === " " || e === " " || e === "\n", en = (e, t, n, r, i) => {
575
+ if (!($t(n) && $t(r))) return !1;
567
576
  if (t > i.lineEnd) {
568
577
  let n = e.indexOf("\n", t);
569
- i.lineEnd = n === -1 ? e.length : n, i.result = F(e, t, "_");
578
+ i.lineEnd = n === -1 ? e.length : n, i.result = Wt(e, t, "_");
570
579
  }
571
580
  return i.result;
572
- }, en = (e, t, n, r) => {
581
+ }, tn = (e, t, n, r) => {
573
582
  let i = e.text, a = t, o = !1;
574
583
  a > 0 && i[a - 1] === "\\" && (a += 1, o = !0);
575
584
  let s = n - a;
576
585
  if (s < 2) return !1;
577
586
  let c = a > 0 ? i[a - 1] : "", l = o ? "\\" : c, u = n < i.length ? i[n] : "";
578
- return P(l) && P(u) || $t(i, a, l, u, r) || xt(e, a) || wt(e, a) || Et(e, a) ? !1 : Math.floor(s / 2) % 2 == 1;
579
- }, tn = (e) => {
580
- let t = k(e), n = e.length, r = {
587
+ return P(l) && P(u) || en(i, a, l, u, r) || Ct(e, a) || Et(e, a) || A(e, a) ? !1 : Math.floor(s / 2) % 2 == 1;
588
+ }, nn = (e) => {
589
+ let t = O(e), n = e.length, r = {
581
590
  lineEnd: -1,
582
591
  result: !1
583
592
  }, i = !1, a = 0;
584
593
  for (; a < n;) {
585
- if (e[a] !== "_" || t.regions[a] !== D.PROSE) {
594
+ if (e[a] !== "_" || t.regions[a] !== E.PROSE) {
586
595
  a += 1;
587
596
  continue;
588
597
  }
589
598
  let o = a, s = a + 1;
590
- for (; s < n && e[s] === "_" && t.regions[s] === D.PROSE;) s += 1;
591
- a = s, en(t, o, s, r) && (i = !i);
599
+ for (; s < n && e[s] === "_" && t.regions[s] === E.PROSE;) s += 1;
600
+ a = s, tn(t, o, s, r) && (i = !i);
592
601
  }
593
602
  return i;
594
- }, nn = (e, t, n) => {
595
- if (!t || Lt.test(t)) return !0;
603
+ }, rn = (e, t, n) => {
604
+ if (!t || Rt.test(t)) return !0;
596
605
  let r = e.substring(0, n).lastIndexOf("\n"), i = r === -1 ? 0 : r + 1, a = e.substring(i, n);
597
- return Rt.test(a) && t.includes("\n") ? !0 : F(e, n, "*");
598
- }, rn = (e) => {
599
- let t = N(e, kt);
606
+ return zt.test(a) && t.includes("\n") ? !0 : Wt(e, n, "*");
607
+ }, an = (e) => {
608
+ let t = N(e, At);
600
609
  if (!t) return e;
601
610
  let n = t[2], r = e.lastIndexOf(t[1]);
602
- return j(e, r) || M(e, r) || nn(e, n, r) ? e : Zt(e) % 2 == 1 ? n.endsWith("*") ? `${e}*` : `${e}**` : e;
603
- }, an = (e, t, n) => {
604
- if (!t || Lt.test(t)) return !0;
611
+ return j(e, r) || M(e, r) || rn(e, n, r) ? e : Qt(e) % 2 == 1 ? n.endsWith("*") ? `${e}*` : `${e}**` : e;
612
+ }, on = (e, t, n) => {
613
+ if (!t || Rt.test(t)) return !0;
605
614
  let r = e.substring(0, n).lastIndexOf("\n"), i = r === -1 ? 0 : r + 1, a = e.substring(i, n);
606
- return Rt.test(a) && t.includes("\n") ? !0 : F(e, n, "_");
607
- }, on = (e) => {
608
- let t = N(e, At);
615
+ return zt.test(a) && t.includes("\n") ? !0 : Wt(e, n, "_");
616
+ }, sn = (e) => {
617
+ let t = N(e, jt);
609
618
  if (!t) {
610
- let t = N(e, Ft);
619
+ let t = N(e, It);
611
620
  if (t) {
612
621
  let n = e.lastIndexOf(t[1]);
613
- if (!(j(e, n) || M(e, n)) && tn(e)) return `${e}_`;
622
+ if (!(j(e, n) || M(e, n)) && nn(e)) return `${e}_`;
614
623
  }
615
624
  return e;
616
625
  }
617
626
  let n = t[2], r = e.lastIndexOf(t[1]);
618
- return j(e, r) || M(e, r) || an(e, n, r) ? e : tn(e) ? `${e}__` : e;
619
- }, sn = (e, t) => {
627
+ return j(e, r) || M(e, r) || on(e, n, r) ? e : nn(e) ? `${e}__` : e;
628
+ }, cn = (e, t) => {
620
629
  let { text: n } = e;
621
- return n[t] === "*" && e.regions[t] === D.PROSE && n[t - 1] !== "*" && n[t + 1] !== "*" && n[t - 1] !== "\\" && !xt(e, t);
622
- }, cn = (e) => {
623
- let t = k(e);
630
+ return n[t] === "*" && e.regions[t] === E.PROSE && n[t - 1] !== "*" && n[t + 1] !== "*" && n[t - 1] !== "\\" && !Ct(e, t);
631
+ }, ln = (e) => {
632
+ let t = O(e);
624
633
  for (let n = e.indexOf("*"); n !== -1; n = e.indexOf("*", n + 1)) {
625
- if (!sn(t, n)) continue;
626
- let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r || I(r), o = !i || I(i);
634
+ if (!cn(t, n)) continue;
635
+ let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r || Gt(r), o = !i || Gt(i);
627
636
  if (!(a && o) && !(r && i && P(r) && P(i)) && !o) return n;
628
637
  }
629
638
  return -1;
630
- }, ln = (e) => {
631
- if (!N(e, Mt)) return e;
632
- let t = cn(e);
639
+ }, un = (e) => {
640
+ if (!N(e, Nt)) return e;
641
+ let t = ln(e);
633
642
  if (t === -1 || j(e, t) || M(e, t)) return e;
634
643
  let n = e.substring(t + 1);
635
- return !n || Lt.test(n) ? e : qt(e) % 2 == 1 ? `${e}*` : e;
636
- }, un = (e) => {
637
- let t = k(e);
638
- for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] === D.PROSE && e[n - 1] !== "_" && e[n + 1] !== "_" && e[n - 1] !== "\\" && !xt(t, n) && !wt(t, n)) {
644
+ return !n || Rt.test(n) ? e : Jt(e) % 2 == 1 ? `${e}*` : e;
645
+ }, dn = (e) => {
646
+ let t = O(e);
647
+ for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] === E.PROSE && e[n - 1] !== "_" && e[n + 1] !== "_" && e[n - 1] !== "\\" && !Ct(t, n) && !Et(t, n)) {
639
648
  let t = n > 0 ? e[n - 1] : "", r = n < e.length - 1 ? e[n + 1] : "";
640
649
  if (t && r && P(t) && P(r)) continue;
641
650
  return n;
642
651
  }
643
652
  return -1;
644
- }, dn = (e) => {
653
+ }, fn = (e) => {
645
654
  let t = e.length;
646
655
  for (; t > 0 && e[t - 1] === "\n";) --t;
647
656
  return t < e.length ? `${e.slice(0, t)}_${e.slice(t)}` : `${e}_`;
648
- }, fn = (e) => {
657
+ }, pn = (e) => {
649
658
  if (!e.endsWith("**")) return null;
650
659
  let t = e.slice(0, -2);
651
- if (Zt(t) % 2 != 1) return null;
652
- let n = t.indexOf("**"), r = un(t);
660
+ if (Qt(t) % 2 != 1) return null;
661
+ let n = t.indexOf("**"), r = dn(t);
653
662
  return n !== -1 && r !== -1 && n < r ? `${t}_**` : null;
654
- }, pn = (e) => {
655
- if (!N(e, Nt)) return e;
656
- let t = un(e);
663
+ }, mn = (e) => {
664
+ if (!N(e, Pt)) return e;
665
+ let t = dn(e);
657
666
  if (t === -1) return e;
658
667
  let n = e.substring(t + 1);
659
- if (!n || Lt.test(n) || j(e, t) || M(e, t)) return e;
660
- if (Yt(e) % 2 == 1) {
661
- let t = fn(e);
662
- return t === null ? dn(e) : t;
668
+ if (!n || Rt.test(n) || j(e, t) || M(e, t)) return e;
669
+ if (Xt(e) % 2 == 1) {
670
+ let t = pn(e);
671
+ return t === null ? fn(e) : t;
663
672
  }
664
673
  return e;
665
- }, mn = (e) => {
666
- let t = Zt(e), n = qt(e);
674
+ }, hn = (e) => {
675
+ let t = Qt(e), n = Jt(e);
667
676
  return t % 2 == 0 && n % 2 == 0;
668
- }, hn = (e, t, n) => !t || Lt.test(t) || j(e, n) || M(e, n) ? !0 : F(e, n, "*"), gn = (e) => {
669
- if (Bt.test(e)) return e;
670
- let t = N(e, jt);
677
+ }, gn = (e, t, n) => !t || Rt.test(t) || j(e, n) || M(e, n) ? !0 : Wt(e, n, "*"), _n = (e) => {
678
+ if (Vt.test(e)) return e;
679
+ let t = N(e, Mt);
671
680
  if (!t) return e;
672
681
  let n = t[2];
673
- return hn(e, n, e.lastIndexOf(t[1])) ? e : Xt(e) % 2 == 1 ? mn(e) ? e : `${e}***` : e;
674
- }, _n = /<[a-zA-Z/][^>]*$/, vn = /[a-zA-Z/]/, yn = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), bn = (e, t) => {
682
+ return gn(e, n, e.lastIndexOf(t[1])) ? e : Zt(e) % 2 == 1 ? hn(e) ? e : `${e}***` : e;
683
+ }, vn = /<[a-zA-Z/][^>]*$/, yn = /[a-zA-Z/]/, bn = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), xn = (e, t) => {
675
684
  let n = e[t + 1];
676
- return n !== void 0 && vn.test(n);
677
- }, xn = (e) => {
678
- let t = e.match(_n);
685
+ return n !== void 0 && yn.test(n);
686
+ }, Sn = (e) => {
687
+ let t = e.match(vn);
679
688
  if (!t || t.index === void 0) return e;
680
- let n = yn(e);
681
- for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" && bn(e, r) && !j(e, r) && !(n && Ut(e, r))) return e.substring(0, r).trimEnd();
689
+ let n = bn(e);
690
+ for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" && xn(e, r) && !j(e, r) && !(n && F(e, r))) return e.substring(0, r).trimEnd();
682
691
  return e;
683
- }, Sn = (e) => {
684
- let t = k(e);
692
+ }, Cn = (e) => {
693
+ let t = O(e);
685
694
  if (t.openFence) return e;
686
695
  let n = t.openSpan;
687
696
  if (!n) return e;
688
697
  let r = e.slice(n.start + n.runLength);
689
- if (!r || Lt.test(r)) return e;
698
+ if (!r || Rt.test(r)) return e;
690
699
  let i = 0, a = e.length - 1;
691
700
  for (; a >= 0 && e[a] === "`";) i += 1, --a;
692
701
  return i >= n.runLength ? e : e + "`".repeat(n.runLength - i);
693
- }, Cn = (e) => mt(e, "$"), wn = (e) => {
694
- let t = k(e), n = 0;
695
- for (let r = 0; r < e.length; r += 1) e[r] === "\\" ? r += 1 : t.regions[r] === D.PROSE && e[r] === "$" && (r + 1 < e.length && e[r + 1] === "$" ? r += 1 : n += 1);
702
+ }, wn = (e) => gt(e, "$"), Tn = (e) => {
703
+ let t = O(e), n = 0;
704
+ for (let r = 0; r < e.length; r += 1) e[r] === "\\" ? r += 1 : t.regions[r] === E.PROSE && e[r] === "$" && (r + 1 < e.length && e[r + 1] === "$" ? r += 1 : n += 1);
696
705
  return n;
697
- }, Tn = (e) => {
706
+ }, En = (e) => {
698
707
  if (e.endsWith("$") && !e.endsWith("$$")) return `${e}$`;
699
708
  let t = e.indexOf("$$");
700
709
  return t !== -1 && e.indexOf("\n", t) !== -1 && !e.endsWith("\n") ? `${e}
701
710
  $$` : `${e}$$`;
702
- }, En = (e) => Cn(e) % 2 == 0 ? e : Tn(e), Dn = (e) => wn(e) % 2 == 1 ? `${e}$` : e, On = "streamdown:incomplete-image", kn = (e, t, n) => {
711
+ }, Dn = (e) => wn(e) % 2 == 0 ? e : En(e), On = (e) => Tn(e) % 2 == 1 ? `${e}$` : e, kn = "streamdown:incomplete-image", An = (e, t, n) => {
703
712
  if (e.substring(t + 2).includes(")")) return null;
704
- let r = Vt(e, t);
713
+ let r = Ht(e, t);
705
714
  if (r === -1 || j(e, r)) return null;
706
715
  let i = r > 0 && e[r - 1] === "!", a = i ? r - 1 : r, o = e.substring(0, a), s = e.substring(r + 1, t);
707
- return i ? `${o}![${s}](${On})` : n === "text-only" ? `${o}${s}` : `${o}[${s}](streamdown:incomplete-link)`;
708
- }, An = (e, t) => {
716
+ return i ? `${o}![${s}](${kn})` : n === "text-only" ? `${o}${s}` : `${o}[${s}](streamdown:incomplete-link)`;
717
+ }, jn = (e, t) => {
709
718
  for (let n = 0; n < t; n++) if (e[n] === "[" && !j(e, n)) {
710
719
  if (n > 0 && e[n - 1] === "!") continue;
711
- let t = Ht(e, n);
720
+ let t = Ut(e, n);
712
721
  if (t === -1) return n;
713
722
  if (t + 1 < e.length && e[t + 1] === "(") {
714
723
  let r = e.indexOf(")", t + 2);
@@ -716,69 +725,69 @@ $$` : `${e}$$`;
716
725
  }
717
726
  }
718
727
  return t;
719
- }, jn = (e, t, n) => {
728
+ }, Mn = (e, t, n) => {
720
729
  let r = t > 0 && e[t - 1] === "!", i = r ? t - 1 : t;
721
- if (!e.substring(t + 1).includes("]") || Ht(e, t) === -1) {
730
+ if (!e.substring(t + 1).includes("]") || Ut(e, t) === -1) {
722
731
  let a = e.substring(0, i);
723
- if (r) return `${a}![${e.substring(t + 1)}](${On})`;
732
+ if (r) return `${a}![${e.substring(t + 1)}](${kn})`;
724
733
  if (n === "text-only") {
725
- let n = An(e, t);
734
+ let n = jn(e, t);
726
735
  return e.substring(0, n) + e.substring(n + 1);
727
736
  }
728
737
  return `${e}](streamdown:incomplete-link)`;
729
738
  }
730
739
  return null;
731
- }, Mn = (e, t) => {
740
+ }, Nn = (e, t) => {
732
741
  let n = e.lastIndexOf("](");
733
742
  if (n !== -1 && !j(e, n)) {
734
- let r = kn(e, n, t);
743
+ let r = An(e, n, t);
735
744
  if (r !== null) return r;
736
745
  }
737
746
  for (let n = e.lastIndexOf("["); n !== -1; n = n === 0 ? -1 : e.lastIndexOf("[", n - 1)) if (!j(e, n)) {
738
- let r = jn(e, n, t);
747
+ let r = Mn(e, n, t);
739
748
  if (r !== null) return r;
740
749
  }
741
750
  return e;
742
- }, Nn = 32, Pn = (e, t = "protocol") => {
751
+ }, Pn = 32, Fn = (e, t = "protocol") => {
743
752
  let n = e;
744
- for (let e = 0; e < Nn; e += 1) {
745
- let e = Mn(n, t);
753
+ for (let e = 0; e < Pn; e += 1) {
754
+ let e = Nn(n, t);
746
755
  if (e.length >= n.length) return e;
747
756
  n = e;
748
757
  }
749
758
  return n;
750
- }, Fn = /^-{1,2}$/, In = /^[\s]*-{1,2}[\s]+$/, Ln = /^={1,2}$/, Rn = /^[\s]*={1,2}[\s]+$/, zn = (e) => {
759
+ }, In = /^-{1,2}$/, Ln = /^[\s]*-{1,2}[\s]+$/, Rn = /^={1,2}$/, zn = /^[\s]*={1,2}[\s]+$/, Bn = (e) => {
751
760
  if (!e || typeof e != "string") return e;
752
761
  let t = e.lastIndexOf("\n");
753
762
  if (t === -1) return e;
754
763
  let n = e.substring(t + 1), r = e.substring(0, t), i = n.trim();
755
- if (Fn.test(i) && !n.match(In)) {
764
+ if (In.test(i) && !n.match(Ln)) {
756
765
  let t = r.split("\n").at(-1);
757
766
  if (t && t.trim().length > 0) return `${e}\u200B`;
758
767
  }
759
- if (Ln.test(i) && !n.match(Rn)) {
768
+ if (Rn.test(i) && !n.match(zn)) {
760
769
  let t = r.split("\n").at(-1);
761
770
  if (t && t.trim().length > 0) return `${e}\u200B`;
762
771
  }
763
772
  return e;
764
- }, Bn = /([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu, Vn = (e) => !e || typeof e != "string" || !e.includes("~") ? e : e.replace(Bn, (t, n, r) => j(e, r + n.length) ? t : `${n}\\~`), Hn = (e) => mt(e, "~"), Un = (e) => {
765
- let t = N(e, Pt);
773
+ }, Vn = /([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu, Hn = (e) => !e || typeof e != "string" || !e.includes("~") ? e : e.replace(Vn, (t, n, r) => j(e, r + n.length) ? t : `${n}\\~`), Un = (e) => gt(e, "~"), Wn = (e) => {
774
+ let t = N(e, Ft);
766
775
  if (t) {
767
776
  let n = t[2];
768
- if (!n || Lt.test(n)) return e;
777
+ if (!n || Rt.test(n)) return e;
769
778
  let r = e.lastIndexOf(t[1]);
770
779
  if (j(e, r) || M(e, r)) return e;
771
- if (Hn(e) % 2 == 1) return `${e}~~`;
780
+ if (Un(e) % 2 == 1) return `${e}~~`;
772
781
  } else {
773
- let t = N(e, It);
782
+ let t = N(e, Lt);
774
783
  if (t) {
775
784
  let n = e.lastIndexOf(t[0].slice(0, 2));
776
785
  if (j(e, n) || M(e, n)) return e;
777
- if (Hn(e) % 2 == 1) return `${e}~`;
786
+ if (Un(e) % 2 == 1) return `${e}~`;
778
787
  }
779
788
  }
780
789
  return e;
781
- }, Wn = (e) => e !== !1, Gn = (e) => e === !0, L = {
790
+ }, Gn = (e) => e !== !1, Kn = (e) => e === !0, L = {
782
791
  SINGLE_TILDE: 0,
783
792
  COMPARISON_OPERATORS: 5,
784
793
  HTML_TAGS: 10,
@@ -794,11 +803,11 @@ $$` : `${e}$$`;
794
803
  KATEX: 70,
795
804
  INLINE_KATEX: 75,
796
805
  DEFAULT: 100
797
- }, Kn = [
806
+ }, qn = [
798
807
  {
799
808
  handler: {
800
809
  name: "singleTilde",
801
- handle: Vn,
810
+ handle: Hn,
802
811
  priority: L.SINGLE_TILDE
803
812
  },
804
813
  optionKey: "singleTilde"
@@ -806,7 +815,7 @@ $$` : `${e}$$`;
806
815
  {
807
816
  handler: {
808
817
  name: "comparisonOperators",
809
- handle: Ot,
818
+ handle: kt,
810
819
  priority: L.COMPARISON_OPERATORS
811
820
  },
812
821
  optionKey: "comparisonOperators"
@@ -814,7 +823,7 @@ $$` : `${e}$$`;
814
823
  {
815
824
  handler: {
816
825
  name: "htmlTags",
817
- handle: xn,
826
+ handle: Sn,
818
827
  priority: L.HTML_TAGS
819
828
  },
820
829
  optionKey: "htmlTags"
@@ -822,7 +831,7 @@ $$` : `${e}$$`;
822
831
  {
823
832
  handler: {
824
833
  name: "setextHeadings",
825
- handle: zn,
834
+ handle: Bn,
826
835
  priority: L.SETEXT_HEADINGS
827
836
  },
828
837
  optionKey: "setextHeadings"
@@ -830,7 +839,7 @@ $$` : `${e}$$`;
830
839
  {
831
840
  handler: {
832
841
  name: "links",
833
- handle: Pn,
842
+ handle: Fn,
834
843
  priority: L.LINKS
835
844
  },
836
845
  optionKey: "links",
@@ -839,7 +848,7 @@ $$` : `${e}$$`;
839
848
  {
840
849
  handler: {
841
850
  name: "boldItalic",
842
- handle: gn,
851
+ handle: _n,
843
852
  priority: L.BOLD_ITALIC
844
853
  },
845
854
  optionKey: "boldItalic"
@@ -847,7 +856,7 @@ $$` : `${e}$$`;
847
856
  {
848
857
  handler: {
849
858
  name: "bold",
850
- handle: rn,
859
+ handle: an,
851
860
  priority: L.BOLD
852
861
  },
853
862
  optionKey: "bold"
@@ -855,7 +864,7 @@ $$` : `${e}$$`;
855
864
  {
856
865
  handler: {
857
866
  name: "italicDoubleUnderscore",
858
- handle: on,
867
+ handle: sn,
859
868
  priority: L.ITALIC_DOUBLE_UNDERSCORE
860
869
  },
861
870
  optionKey: "italic"
@@ -863,7 +872,7 @@ $$` : `${e}$$`;
863
872
  {
864
873
  handler: {
865
874
  name: "italicSingleAsterisk",
866
- handle: ln,
875
+ handle: un,
867
876
  priority: L.ITALIC_SINGLE_ASTERISK
868
877
  },
869
878
  optionKey: "italic"
@@ -871,7 +880,7 @@ $$` : `${e}$$`;
871
880
  {
872
881
  handler: {
873
882
  name: "italicSingleUnderscore",
874
- handle: pn,
883
+ handle: mn,
875
884
  priority: L.ITALIC_SINGLE_UNDERSCORE
876
885
  },
877
886
  optionKey: "italic"
@@ -879,7 +888,7 @@ $$` : `${e}$$`;
879
888
  {
880
889
  handler: {
881
890
  name: "inlineCode",
882
- handle: Sn,
891
+ handle: Cn,
883
892
  priority: L.INLINE_CODE
884
893
  },
885
894
  optionKey: "inlineCode"
@@ -887,7 +896,7 @@ $$` : `${e}$$`;
887
896
  {
888
897
  handler: {
889
898
  name: "strikethrough",
890
- handle: Un,
899
+ handle: Wn,
891
900
  priority: L.STRIKETHROUGH
892
901
  },
893
902
  optionKey: "strikethrough"
@@ -895,7 +904,7 @@ $$` : `${e}$$`;
895
904
  {
896
905
  handler: {
897
906
  name: "katex",
898
- handle: En,
907
+ handle: Dn,
899
908
  priority: L.KATEX
900
909
  },
901
910
  optionKey: "katex"
@@ -903,36 +912,36 @@ $$` : `${e}$$`;
903
912
  {
904
913
  handler: {
905
914
  name: "inlineKatex",
906
- handle: Dn,
915
+ handle: On,
907
916
  priority: L.INLINE_KATEX
908
917
  },
909
918
  optionKey: "inlineKatex"
910
919
  }
911
- ], qn = (e) => {
920
+ ], Jn = (e) => {
912
921
  let t = e?.linkMode ?? "protocol";
913
- return Kn.filter(({ handler: t, optionKey: n }) => t.name === "links" ? Wn(e?.links) || Wn(e?.images) : t.name === "inlineKatex" ? Gn(e?.inlineKatex) : Wn(e?.[n])).map(({ handler: e, earlyReturn: n }) => e.name === "links" ? {
914
- handler: Je(qe({}, e), { handle: (e) => Pn(e, t) }),
922
+ return qn.filter(({ handler: t, optionKey: n }) => t.name === "links" ? Gn(e?.links) || Gn(e?.images) : t.name === "inlineKatex" ? Kn(e?.inlineKatex) : Gn(e?.[n])).map(({ handler: e, earlyReturn: n }) => e.name === "links" ? {
923
+ handler: Xe(Ye({}, e), { handle: (e) => Fn(e, t) }),
915
924
  earlyReturn: t === "protocol" ? n : void 0
916
925
  } : {
917
926
  handler: e,
918
927
  earlyReturn: n
919
928
  });
920
- }, Jn = (e, t) => {
929
+ }, Yn = (e, t) => {
921
930
  if (!e || typeof e != "string") return e;
922
- let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r = qn(t), i = (t?.handlers ?? []).map((e) => ({
923
- handler: Je(qe({}, e), { priority: e.priority ?? L.DEFAULT }),
931
+ let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r = Jn(t), i = (t?.handlers ?? []).map((e) => ({
932
+ handler: Xe(Ye({}, e), { priority: e.priority ?? L.DEFAULT }),
924
933
  earlyReturn: void 0
925
934
  })), a = [...r, ...i].sort((e, t) => (e.handler.priority ?? 0) - (t.handler.priority ?? 0));
926
935
  try {
927
936
  for (let { handler: e, earlyReturn: t } of a) if (n = e.handle(n), t != null && t(n)) return n;
928
937
  return n.endsWith(" ") && !n.endsWith(" ") ? n.slice(0, -1) : n;
929
938
  } finally {
930
- dt();
939
+ pt();
931
940
  }
932
941
  };
933
942
  //#endregion
934
943
  //#region ../../node_modules/.pnpm/marked@18.1.1/node_modules/marked/lib/marked.esm.js
935
- function Yn() {
944
+ function Xn() {
936
945
  return {
937
946
  async: !1,
938
947
  breaks: !1,
@@ -946,12 +955,12 @@ function Yn() {
946
955
  walkTokens: null
947
956
  };
948
957
  }
949
- var Xn = Yn();
950
- function Zn(e) {
951
- Xn = e;
958
+ var Zn = Xn();
959
+ function Qn(e) {
960
+ Zn = e;
952
961
  }
953
- var Qn = { exec: () => null };
954
- function $n(e) {
962
+ var $n = { exec: () => null };
963
+ function er(e) {
955
964
  let t = [];
956
965
  return (n) => {
957
966
  let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
@@ -968,7 +977,7 @@ function R(e, t = "") {
968
977
  };
969
978
  return r;
970
979
  }
971
- var er = ((e = "") => {
980
+ var tr = ((e = "") => {
972
981
  try {
973
982
  return !!RegExp("(?<=1)(?<!1)" + e);
974
983
  } catch {
@@ -1029,113 +1038,113 @@ var er = ((e = "") => {
1029
1038
  notSpaceStart: /^\S*/,
1030
1039
  endingNewline: /\n$/,
1031
1040
  listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
1032
- nextBulletRegex: $n((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
1033
- hrRegex: $n((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
1034
- fencesBeginRegex: $n((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
1035
- headingBeginRegex: $n((e) => RegExp(`^ {0,${e}}#`)),
1036
- htmlBeginRegex: $n((e) => RegExp(`^ {0,${e}}(?:</?(?:${hr})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`, "i")),
1037
- blockquoteBeginRegex: $n((e) => RegExp(`^ {0,${e}}>`))
1038
- }, tr = /^(?:[ \t]*(?:\n|$))+/, nr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, rr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ir = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ar = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, or = / {0,3}(?:[*+-]|\d{1,9}[.)])/, sr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, cr = R(sr).replace(/bull/g, or).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), lr = R(sr).replace(/bull/g, or).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ur = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, dr = /^[^\n]+/, fr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, pr = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", fr).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), mr = R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, or).getRegex(), hr = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", gr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _r = R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", gr).replace("tag", hr).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vr = (e) => R(ur).replace("hr", ir).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", hr).getRegex(), yr = vr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), br = vr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), xr = {
1039
- blockquote: R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", br).getRegex(),
1040
- code: nr,
1041
- def: pr,
1042
- fences: rr,
1043
- heading: ar,
1044
- hr: ir,
1045
- html: _r,
1046
- lheading: cr,
1047
- list: mr,
1048
- newline: tr,
1049
- paragraph: yr,
1050
- table: Qn,
1051
- text: dr
1052
- }, Sr = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ir).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", hr).getRegex(), Cr = {
1053
- ...xr,
1041
+ nextBulletRegex: er((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
1042
+ hrRegex: er((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
1043
+ fencesBeginRegex: er((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
1044
+ headingBeginRegex: er((e) => RegExp(`^ {0,${e}}#`)),
1045
+ htmlBeginRegex: er((e) => RegExp(`^ {0,${e}}(?:</?(?:${gr})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`, "i")),
1046
+ blockquoteBeginRegex: er((e) => RegExp(`^ {0,${e}}>`))
1047
+ }, nr = /^(?:[ \t]*(?:\n|$))+/, rr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ir = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ar = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, or = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, sr = / {0,3}(?:[*+-]|\d{1,9}[.)])/, cr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, lr = R(cr).replace(/bull/g, sr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ur = R(cr).replace(/bull/g, sr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), dr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, fr = /^[^\n]+/, pr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, mr = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pr).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hr = R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, sr).getRegex(), gr = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", _r = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, vr = R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", _r).replace("tag", gr).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), yr = (e) => R(dr).replace("hr", ar).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", gr).getRegex(), br = yr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), xr = yr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Sr = {
1048
+ blockquote: R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", xr).getRegex(),
1049
+ code: rr,
1050
+ def: mr,
1051
+ fences: ir,
1052
+ heading: or,
1053
+ hr: ar,
1054
+ html: vr,
1054
1055
  lheading: lr,
1055
- table: Sr,
1056
- paragraph: R(ur).replace("hr", ir).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Sr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", hr).getRegex()
1057
- }, wr = {
1058
- ...xr,
1059
- html: R("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", gr).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
1056
+ list: hr,
1057
+ newline: nr,
1058
+ paragraph: br,
1059
+ table: $n,
1060
+ text: fr
1061
+ }, Cr = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ar).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", gr).getRegex(), wr = {
1062
+ ...Sr,
1063
+ lheading: ur,
1064
+ table: Cr,
1065
+ paragraph: R(dr).replace("hr", ar).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Cr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", gr).getRegex()
1066
+ }, Tr = {
1067
+ ...Sr,
1068
+ html: R("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", _r).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
1060
1069
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
1061
1070
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
1062
- fences: Qn,
1071
+ fences: $n,
1063
1072
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
1064
- paragraph: R(ur).replace("hr", ir).replace("heading", " *#{1,6} *[^\n]").replace("lheading", cr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1065
- }, Tr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Er = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Dr = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, Or = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, kr = /[\s\p{P}\p{S}]/u, Ar = /[^\s\p{P}\p{S}]/u, jr = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, kr).getRegex(), Mr = /[\p{Pi}\p{Ps}"']/u, Nr = /(?!~)[\p{P}\p{S}]/u, Pr = /(?!~)[\s\p{P}\p{S}]/u, Fr = /(?:[^\s\p{P}\p{S}]|~)/u, Ir = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", er ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Lr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rr = R(Lr, "u").replace(/punct/g, B).getRegex(), zr = R(Lr, "u").replace(/punct/g, Nr).getRegex(), Br = R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Mr).replace(/punct/g, B).getRegex(), Vr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Hr = R(Vr, "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, kr).replace(/punct/g, B).getRegex(), Ur = R(Vr, "gu").replace(/notPunctSpace/g, Fr).replace(/punctSpace/g, Pr).replace(/punct/g, Nr).getRegex(), Wr = R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, kr).replace(/punct/g, B).getRegex(), Gr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, kr).replace(/punct/g, B).getRegex(), Kr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, kr).replace(/punct/g, B).getRegex(), qr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, B).getRegex(), Jr = R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, kr).replace(/punct/g, B).getRegex(), Yr = R(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), Xr = R(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/, "gu").replace(/punct/g, B).getRegex(), Zr = R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Qr = R(gr).replace("(?:-->|$)", "-->").getRegex(), $r = R("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Qr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ei = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, ti = R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", ei).getRegex(), ni = R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", ti).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ri = R(/^!?\[(label)\]\[(ref)\]/).replace("label", ti).replace("ref", fr).getRegex(), ii = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", fr).getRegex(), ai = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, oi = R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", ei).getRegex(), si = R("reflink|nolink(?!\\()", "g").replace("reflink", R(/^!?\[(label)\]\[(ref)\]/).replace("label", oi).replace("ref", ai).getRegex()).replace("nolink", R(/^!?\[(ref)\](?:\[\])?/).replace("ref", ai).getRegex()).getRegex(), ci = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, li = R(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), ui = {
1066
- _backpedal: Qn,
1067
- anyPunctuation: Yr,
1068
- anyPunctuationOutsideCode: Xr,
1069
- autolink: Zr,
1070
- blockSkip: Ir,
1071
- br: Dr,
1072
- code: Er,
1073
- del: Qn,
1074
- delLDelim: Qn,
1075
- delRDelim: Qn,
1076
- emStrongLDelim: Rr,
1077
- emStrongRDelimAst: Hr,
1078
- emStrongRDelimUnd: Gr,
1079
- escape: Tr,
1080
- link: ni,
1081
- nolink: ii,
1082
- punctuation: jr,
1083
- reflink: ri,
1084
- reflinkSearch: si,
1085
- tag: $r,
1086
- text: Or,
1087
- url: Qn
1088
- }, di = {
1089
- ...ui,
1090
- emStrongLDelim: Br,
1091
- emStrongRDelimAst: Wr,
1073
+ paragraph: R(dr).replace("hr", ar).replace("heading", " *#{1,6} *[^\n]").replace("lheading", lr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1074
+ }, Er = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Dr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Or = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, kr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, Ar = /[\s\p{P}\p{S}]/u, jr = /[^\s\p{P}\p{S}]/u, Mr = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Ar).getRegex(), Nr = /[\p{Pi}\p{Ps}"']/u, Pr = /(?!~)[\p{P}\p{S}]/u, Fr = /(?!~)[\s\p{P}\p{S}]/u, Ir = /(?:[^\s\p{P}\p{S}]|~)/u, Lr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", tr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Rr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, zr = R(Rr, "u").replace(/punct/g, B).getRegex(), Br = R(Rr, "u").replace(/punct/g, Pr).getRegex(), Vr = R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Nr).replace(/punct/g, B).getRegex(), Hr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ur = R(Hr, "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), Wr = R(Hr, "gu").replace(/notPunctSpace/g, Ir).replace(/punctSpace/g, Fr).replace(/punct/g, Pr).getRegex(), Gr = R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), Kr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), qr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), Jr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, B).getRegex(), Yr = R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, jr).replace(/punctSpace/g, Ar).replace(/punct/g, B).getRegex(), Xr = R(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), Zr = R(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/, "gu").replace(/punct/g, B).getRegex(), Qr = R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), $r = R(_r).replace("(?:-->|$)", "-->").getRegex(), ei = R("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", $r).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ti = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, ni = R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", ti).getRegex(), ri = R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", ni).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ii = R(/^!?\[(label)\]\[(ref)\]/).replace("label", ni).replace("ref", pr).getRegex(), ai = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", pr).getRegex(), oi = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, si = R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", ti).getRegex(), ci = R("reflink|nolink(?!\\()", "g").replace("reflink", R(/^!?\[(label)\]\[(ref)\]/).replace("label", si).replace("ref", oi).getRegex()).replace("nolink", R(/^!?\[(ref)\](?:\[\])?/).replace("ref", oi).getRegex()).getRegex(), li = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ui = R(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), di = {
1075
+ _backpedal: $n,
1076
+ anyPunctuation: Xr,
1077
+ anyPunctuationOutsideCode: Zr,
1078
+ autolink: Qr,
1079
+ blockSkip: Lr,
1080
+ br: Or,
1081
+ code: Dr,
1082
+ del: $n,
1083
+ delLDelim: $n,
1084
+ delRDelim: $n,
1085
+ emStrongLDelim: zr,
1086
+ emStrongRDelimAst: Ur,
1092
1087
  emStrongRDelimUnd: Kr,
1093
- link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", ti).getRegex(),
1094
- reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ti).getRegex()
1088
+ escape: Er,
1089
+ link: ri,
1090
+ nolink: ai,
1091
+ punctuation: Mr,
1092
+ reflink: ii,
1093
+ reflinkSearch: ci,
1094
+ tag: ei,
1095
+ text: kr,
1096
+ url: $n
1095
1097
  }, fi = {
1096
- ...ui,
1097
- emStrongRDelimAst: Ur,
1098
- emStrongLDelim: zr,
1099
- delLDelim: qr,
1100
- delRDelim: Jr,
1101
- url: R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", li).replace("protocol", ci).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
1098
+ ...di,
1099
+ emStrongLDelim: Vr,
1100
+ emStrongRDelimAst: Gr,
1101
+ emStrongRDelimUnd: qr,
1102
+ link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", ni).getRegex(),
1103
+ reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ni).getRegex()
1104
+ }, pi = {
1105
+ ...di,
1106
+ emStrongRDelimAst: Wr,
1107
+ emStrongLDelim: Br,
1108
+ delLDelim: Jr,
1109
+ delRDelim: Yr,
1110
+ url: R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", ui).replace("protocol", li).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
1102
1111
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
1103
1112
  del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
1104
- text: R(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", ci).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
1105
- }, pi = {
1106
- ...fi,
1107
- br: R(Dr).replace("{2,}", "*").getRegex(),
1108
- text: R(fi.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1113
+ text: R(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", li).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
1109
1114
  }, mi = {
1110
- normal: xr,
1111
- gfm: Cr,
1112
- pedantic: wr
1115
+ ...pi,
1116
+ br: R(Or).replace("{2,}", "*").getRegex(),
1117
+ text: R(pi.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1113
1118
  }, hi = {
1114
- normal: ui,
1115
- gfm: fi,
1116
- breaks: pi,
1117
- pedantic: di
1119
+ normal: Sr,
1120
+ gfm: wr,
1121
+ pedantic: Tr
1118
1122
  }, gi = {
1123
+ normal: di,
1124
+ gfm: pi,
1125
+ breaks: mi,
1126
+ pedantic: fi
1127
+ }, _i = {
1119
1128
  "&": "&amp;",
1120
1129
  "<": "&lt;",
1121
1130
  ">": "&gt;",
1122
1131
  "\"": "&quot;",
1123
1132
  "'": "&#39;"
1124
- }, _i = (e) => gi[e];
1133
+ }, vi = (e) => _i[e];
1125
1134
  function V(e, t) {
1126
1135
  if (t) {
1127
- if (z.escapeTest.test(e)) return e.replace(z.escapeReplace, _i);
1128
- } else if (z.escapeTestNoEncode.test(e)) return e.replace(z.escapeReplaceNoEncode, _i);
1136
+ if (z.escapeTest.test(e)) return e.replace(z.escapeReplace, vi);
1137
+ } else if (z.escapeTestNoEncode.test(e)) return e.replace(z.escapeReplaceNoEncode, vi);
1129
1138
  return e;
1130
1139
  }
1131
- function vi(e) {
1140
+ function yi(e) {
1132
1141
  return z.numericCharacterReference.test(e) ? e.replace(z.numericCharacterReferenceOrAmpersand, (e, t, n) => {
1133
1142
  if (t === void 0 && n === void 0) return "&amp;";
1134
1143
  let r = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
1135
1144
  return r === 0 || r > 1114111 || r >= 55296 && r <= 57343 ? "�" : r === 38 ? "&amp;" : String.fromCodePoint(r);
1136
1145
  }) : e;
1137
1146
  }
1138
- function yi(e) {
1147
+ function bi(e) {
1139
1148
  try {
1140
1149
  e = encodeURI(e).replace(z.percentDecode, "%");
1141
1150
  } catch {
@@ -1143,7 +1152,7 @@ function yi(e) {
1143
1152
  }
1144
1153
  return e;
1145
1154
  }
1146
- function bi(e, t) {
1155
+ function xi(e, t) {
1147
1156
  let n = e.replace(z.findPipe, (e, t, n) => {
1148
1157
  let r = !1, i = t;
1149
1158
  for (; --i >= 0 && n[i] === "\\";) r = !r;
@@ -1156,7 +1165,7 @@ function bi(e, t) {
1156
1165
  for (; r < n.length; r++) n[r] = n[r].trim().replace(z.slashPipe, "|");
1157
1166
  return n;
1158
1167
  }
1159
- function xi(e, t, n) {
1168
+ function Si(e, t, n) {
1160
1169
  let r = e.length;
1161
1170
  if (r === 0) return "";
1162
1171
  let i = 0;
@@ -1168,15 +1177,15 @@ function xi(e, t, n) {
1168
1177
  }
1169
1178
  return e.slice(0, r - i);
1170
1179
  }
1171
- function Si(e) {
1180
+ function Ci(e) {
1172
1181
  let t = e.split("\n"), n = t.length - 1;
1173
1182
  for (; n >= 0 && z.blankLine.test(t[n]);) n--;
1174
1183
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
1175
1184
  }
1176
- function Ci(e) {
1185
+ function wi(e) {
1177
1186
  return e.trim().toLowerCase().toUpperCase().toLowerCase();
1178
1187
  }
1179
- function wi(e, t) {
1188
+ function Ti(e, t) {
1180
1189
  if (e.indexOf(t[0]) === -1 && e.indexOf(t[1]) === -1) return -1;
1181
1190
  let n = 0;
1182
1191
  for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
@@ -1184,7 +1193,7 @@ function wi(e, t) {
1184
1193
  else if (e[r] === t[1] && (n--, n < 0)) return r;
1185
1194
  return n > 0 ? -2 : -1;
1186
1195
  }
1187
- function Ti(e, t = 0) {
1196
+ function Ei(e, t = 0) {
1188
1197
  let n = t, r = "";
1189
1198
  for (let t of e) if (t === " ") {
1190
1199
  let e = 4 - n % 4;
@@ -1192,7 +1201,7 @@ function Ti(e, t = 0) {
1192
1201
  } else r += t, n++;
1193
1202
  return r;
1194
1203
  }
1195
- function Ei(e, t, n, r, i) {
1204
+ function Di(e, t, n, r, i) {
1196
1205
  let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1"), c = e[0].charAt(0) === "!", l = r.state.inLink, u = r.state.linkEmitted, d = r.state.inRawBlock;
1197
1206
  r.state.inLink = !0, r.state.linkEmitted = !1;
1198
1207
  let f = r.inlineTokens(s), p = r.state.linkEmitted;
@@ -1212,7 +1221,7 @@ function Ei(e, t, n, r, i) {
1212
1221
  tokens: f
1213
1222
  };
1214
1223
  }
1215
- function Di(e, t, n) {
1224
+ function Oi(e, t, n) {
1216
1225
  let r = e.match(n.other.indentCodeCompensation);
1217
1226
  if (r === null) return t;
1218
1227
  let i = r[1];
@@ -1223,7 +1232,7 @@ function Di(e, t, n) {
1223
1232
  return e.slice(Math.min(r.length, i.length));
1224
1233
  }).join("\n");
1225
1234
  }
1226
- function Oi(e, t, n, r) {
1235
+ function ki(e, t, n, r) {
1227
1236
  if (!t.includes("<")) return !1;
1228
1237
  for (let i = 0; i < t.length; i++) {
1229
1238
  if (t[i] === "\\") {
@@ -1246,12 +1255,12 @@ function Oi(e, t, n, r) {
1246
1255
  }
1247
1256
  return !1;
1248
1257
  }
1249
- var ki = class {
1258
+ var Ai = class {
1250
1259
  options;
1251
1260
  rules;
1252
1261
  lexer;
1253
1262
  constructor(e) {
1254
- this.options = e || Xn;
1263
+ this.options = e || Zn;
1255
1264
  }
1256
1265
  space(e) {
1257
1266
  let t = this.rules.block.newline.exec(e);
@@ -1263,7 +1272,7 @@ var ki = class {
1263
1272
  code(e) {
1264
1273
  let t = this.rules.block.code.exec(e);
1265
1274
  if (t) {
1266
- let e = this.options.pedantic ? t[0] : Si(t[0]);
1275
+ let e = this.options.pedantic ? t[0] : Ci(t[0]);
1267
1276
  return {
1268
1277
  type: "code",
1269
1278
  raw: e,
@@ -1275,7 +1284,7 @@ var ki = class {
1275
1284
  fences(e) {
1276
1285
  let t = this.rules.block.fences.exec(e);
1277
1286
  if (t) {
1278
- let e = t[0], n = Di(e, t[3] || "", this.rules);
1287
+ let e = t[0], n = Oi(e, t[3] || "", this.rules);
1279
1288
  return {
1280
1289
  type: "code",
1281
1290
  raw: e,
@@ -1289,12 +1298,12 @@ var ki = class {
1289
1298
  if (t) {
1290
1299
  let e = t[2].trim();
1291
1300
  if (this.rules.other.endingHash.test(e)) {
1292
- let t = xi(e, "#");
1301
+ let t = Si(e, "#");
1293
1302
  (this.options.pedantic || !t || this.rules.other.endingSpaceTabChar.test(t)) && (e = t.trim());
1294
1303
  }
1295
1304
  return {
1296
1305
  type: "heading",
1297
- raw: xi(t[0], "\n"),
1306
+ raw: Si(t[0], "\n"),
1298
1307
  depth: t[1].length,
1299
1308
  text: e,
1300
1309
  tokens: this.lexer.inline(e)
@@ -1305,13 +1314,13 @@ var ki = class {
1305
1314
  let t = this.rules.block.hr.exec(e);
1306
1315
  if (t) return {
1307
1316
  type: "hr",
1308
- raw: xi(t[0], "\n")
1317
+ raw: Si(t[0], "\n")
1309
1318
  };
1310
1319
  }
1311
1320
  blockquote(e) {
1312
1321
  let t = this.rules.block.blockquote.exec(e);
1313
1322
  if (t) {
1314
- let e = xi(t[0], "\n").split("\n"), n = "", r = "", i = [];
1323
+ let e = Si(t[0], "\n").split("\n"), n = "", r = "", i = [];
1315
1324
  for (; e.length > 0;) {
1316
1325
  let t = !1, a = [], o = 0;
1317
1326
  for (; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
@@ -1365,12 +1374,12 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1365
1374
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
1366
1375
  let l = r();
1367
1376
  e = e.substring(t[0].length);
1368
- let u = t[2].split("\n", 1)[0], d = t[1].length, f = this.options.pedantic ? Ti(u, d) : u.replace(this.rules.other.leadingSpaceTab, (e) => Ti(e, d)), p = e.split("\n", 1)[0], ee = !f.trim(), m = 0;
1377
+ let u = t[2].split("\n", 1)[0], d = t[1].length, f = this.options.pedantic ? Ei(u, d) : u.replace(this.rules.other.leadingSpaceTab, (e) => Ei(e, d)), p = e.split("\n", 1)[0], ee = !f.trim(), m = 0;
1369
1378
  if (this.options.pedantic ? (m = 2, a = f.trimStart()) : ee ? m = d + 1 : (m = f.search(this.rules.other.nonSpaceChar), m = m > 4 ? 1 : m, a = f.slice(m), m += d), ee && this.rules.other.blankLine.test(p) && (e = e.substring(p.length + 1), i = !0), !i) {
1370
1379
  let t = this.rules.other.nextBulletRegex(m), n = this.rules.other.hrRegex(m), r = this.rules.other.fencesBeginRegex(m), i = this.rules.other.headingBeginRegex(m), o = this.rules.other.htmlBeginRegex(m), s = this.rules.other.blockquoteBeginRegex(m);
1371
1380
  for (; e;) {
1372
1381
  let c = e.split("\n", 1)[0], l;
1373
- if (p = c, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), l = p) : l = p.replace(this.rules.other.leadingSpaceTab, (e) => Ti(e)), r.test(p) || i.test(p) || o.test(p) || s.test(p) || t.test(p) || n.test(p)) break;
1382
+ if (p = c, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), l = p) : l = p.replace(this.rules.other.leadingSpaceTab, (e) => Ei(e)), r.test(p) || i.test(p) || o.test(p) || s.test(p) || t.test(p) || n.test(p)) break;
1374
1383
  if (l.search(this.rules.other.nonSpaceChar) >= m || !p.trim()) a += "\n" + l.slice(m);
1375
1384
  else {
1376
1385
  if (ee || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || r.test(f) || i.test(f) || n.test(f)) break;
@@ -1431,7 +1440,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1431
1440
  html(e) {
1432
1441
  let t = this.rules.block.html.exec(e);
1433
1442
  if (t) {
1434
- let e = Si(t[0]);
1443
+ let e = Ci(t[0]);
1435
1444
  return {
1436
1445
  type: "html",
1437
1446
  block: !0,
@@ -1444,12 +1453,12 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1444
1453
  def(e) {
1445
1454
  let t = this.rules.block.def.exec(e);
1446
1455
  if (t) {
1447
- if (!this.rules.other.startAngleBracket.test(t[2]) && wi(t[2], "()") !== -1) return;
1448
- let e = Ci(t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1456
+ if (!this.rules.other.startAngleBracket.test(t[2]) && Ti(t[2], "()") !== -1) return;
1457
+ let e = wi(t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1449
1458
  return {
1450
1459
  type: "def",
1451
1460
  tag: e,
1452
- raw: xi(t[0], "\n"),
1461
+ raw: Si(t[0], "\n"),
1453
1462
  href: n,
1454
1463
  title: r
1455
1464
  };
@@ -1458,9 +1467,9 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1458
1467
  table(e) {
1459
1468
  let t = this.rules.block.table.exec(e);
1460
1469
  if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1461
- let n = bi(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
1470
+ let n = xi(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
1462
1471
  type: "table",
1463
- raw: xi(t[0], "\n"),
1472
+ raw: Si(t[0], "\n"),
1464
1473
  header: [],
1465
1474
  align: [],
1466
1475
  rows: []
@@ -1473,7 +1482,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1473
1482
  header: !0,
1474
1483
  align: a.align[e]
1475
1484
  });
1476
- for (let e of i) a.rows.push(bi(e, a.header.length).map((e, t) => ({
1485
+ for (let e of i) a.rows.push(xi(e, a.header.length).map((e, t) => ({
1477
1486
  text: e,
1478
1487
  tokens: this.lexer.inline(e),
1479
1488
  header: !1,
@@ -1488,7 +1497,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1488
1497
  let e = t[1].trim();
1489
1498
  return {
1490
1499
  type: "heading",
1491
- raw: xi(t[0], "\n"),
1500
+ raw: Si(t[0], "\n"),
1492
1501
  depth: t[2].charAt(0) === "=" ? 1 : 2,
1493
1502
  text: e,
1494
1503
  tokens: this.lexer.inline(e)
@@ -1540,14 +1549,14 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1540
1549
  let t = this.rules.inline.link.exec(e);
1541
1550
  if (t) {
1542
1551
  let n = t[0].charAt(0) === "!" ? 2 : 1;
1543
- if (!this.options.pedantic && Oi(e, t[1], n, this.rules)) return;
1552
+ if (!this.options.pedantic && ki(e, t[1], n, this.rules)) return;
1544
1553
  let r = t[2].trim();
1545
1554
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
1546
1555
  if (!this.rules.other.endAngleBracket.test(r)) return;
1547
- let e = xi(r.slice(0, -1), "\\");
1556
+ let e = Si(r.slice(0, -1), "\\");
1548
1557
  if ((r.length - e.length) % 2 == 0) return;
1549
1558
  } else {
1550
- let e = wi(t[2], "()");
1559
+ let e = Ti(t[2], "()");
1551
1560
  if (e === -2) return;
1552
1561
  if (e > -1) {
1553
1562
  let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
@@ -1559,7 +1568,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1559
1568
  let e = this.rules.other.pedanticHrefTitle.exec(i);
1560
1569
  e && (i = e[1], a = e[3]);
1561
1570
  } else a = t[3] ? t[3].slice(1, -1) : "";
1562
- return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (i = this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? i.slice(1) : i.slice(1, -1)), Ei(t, {
1571
+ return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (i = this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? i.slice(1) : i.slice(1, -1)), Di(t, {
1563
1572
  href: i && i.replace(this.rules.inline.anyPunctuation, "$1"),
1564
1573
  title: a && a.replace(this.rules.inline.anyPunctuation, "$1")
1565
1574
  }, t[0], this.lexer, this.rules);
@@ -1569,8 +1578,8 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1569
1578
  let n;
1570
1579
  if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1571
1580
  let r = n[0].charAt(0) === "!" ? 2 : 1;
1572
- if (!this.options.pedantic && Oi(e, n[1], r, this.rules)) return;
1573
- let i = t[Ci((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
1581
+ if (!this.options.pedantic && ki(e, n[1], r, this.rules)) return;
1582
+ let i = t[wi((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
1574
1583
  if (!i) {
1575
1584
  let e = n[0].charAt(0);
1576
1585
  return {
@@ -1579,7 +1588,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1579
1588
  text: e
1580
1589
  };
1581
1590
  }
1582
- return Ei(n, i, n[0], this.lexer, this.rules);
1591
+ return Di(n, i, n[0], this.lexer, this.rules);
1583
1592
  }
1584
1593
  }
1585
1594
  emStrong(e, t, n = "") {
@@ -1712,7 +1721,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1712
1721
  return {
1713
1722
  type: "text",
1714
1723
  raw: t[0],
1715
- text: e ? t[0] : vi(t[0]),
1724
+ text: e ? t[0] : yi(t[0]),
1716
1725
  escaped: e
1717
1726
  };
1718
1727
  }
@@ -1724,7 +1733,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1724
1733
  inlineQueue;
1725
1734
  tokenizer;
1726
1735
  constructor(e) {
1727
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || Xn, this.options.tokenizer = this.options.tokenizer || new ki(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1736
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || Zn, this.options.tokenizer = this.options.tokenizer || new Ai(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1728
1737
  inLink: !1,
1729
1738
  inRawBlock: !1,
1730
1739
  linkEmitted: !1,
@@ -1733,15 +1742,15 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1733
1742
  };
1734
1743
  let t = {
1735
1744
  other: z,
1736
- block: mi.normal,
1737
- inline: hi.normal
1745
+ block: hi.normal,
1746
+ inline: gi.normal
1738
1747
  };
1739
- this.options.pedantic ? (t.block = mi.pedantic, t.inline = hi.pedantic) : this.options.gfm && (t.block = mi.gfm, t.inline = this.options.breaks ? hi.breaks : hi.gfm), this.tokenizer.rules = t;
1748
+ this.options.pedantic ? (t.block = hi.pedantic, t.inline = gi.pedantic) : this.options.gfm && (t.block = hi.gfm, t.inline = this.options.breaks ? gi.breaks : gi.gfm), this.tokenizer.rules = t;
1740
1749
  }
1741
1750
  static get rules() {
1742
1751
  return {
1743
- block: mi,
1744
- inline: hi
1752
+ block: hi,
1753
+ inline: gi
1745
1754
  };
1746
1755
  }
1747
1756
  static lex(t, n) {
@@ -1831,7 +1840,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1831
1840
  for (let n of e.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t.test(n[0]) && e.charAt(n.index - 1) !== "!") return !0;
1832
1841
  for (let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
1833
1842
  let e = t[0], n = e.lastIndexOf("[");
1834
- if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links, Ci(e.slice(n + 1, -1))) && !(n > 1 && this.linkInText(e.slice(1, n - 1)))) return !0;
1843
+ if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links, wi(e.slice(n + 1, -1))) && !(n > 1 && this.linkInText(e.slice(1, n - 1)))) return !0;
1835
1844
  }
1836
1845
  return !1;
1837
1846
  }
@@ -1850,7 +1859,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1850
1859
  if (this.tokens.links && e.includes("[")) {
1851
1860
  let e = this.tokenizer.rules.inline.reflinkSearch, t = (n) => {
1852
1861
  let r = n.lastIndexOf("[");
1853
- if (!Object.hasOwn(this.tokens.links, Ci(n.slice(r + 1, -1)))) return n;
1862
+ if (!Object.hasOwn(this.tokens.links, wi(n.slice(r + 1, -1)))) return n;
1854
1863
  if (r > 1 && n.charAt(0) !== "!") {
1855
1864
  let i = n.slice(1, r - 1);
1856
1865
  if (this.linkInText(i)) return "[" + i.replace(e, t) + "][" + "a".repeat(n.length - r - 2) + "]";
@@ -1910,11 +1919,11 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1910
1919
  if (this.options.silent) console.error(t);
1911
1920
  else throw Error(t);
1912
1921
  }
1913
- }, Ai = class {
1922
+ }, ji = class {
1914
1923
  options;
1915
1924
  parser;
1916
1925
  constructor(e) {
1917
- this.options = e || Xn;
1926
+ this.options = e || Zn;
1918
1927
  }
1919
1928
  space(e) {
1920
1929
  return "";
@@ -2000,7 +2009,7 @@ ${e}</tr>
2000
2009
  return `<del>${this.parser.parseInline(e)}</del>`;
2001
2010
  }
2002
2011
  link({ href: e, title: t, text: n, tokens: r, autolink: i }) {
2003
- let a = i ? V(n, !0) : this.parser.parseInline(r), o = yi(e);
2012
+ let a = i ? V(n, !0) : this.parser.parseInline(r), o = bi(e);
2004
2013
  if (o === null) return a;
2005
2014
  e = V(o, i);
2006
2015
  let s = "<a href=\"" + e + "\"";
@@ -2008,7 +2017,7 @@ ${e}</tr>
2008
2017
  }
2009
2018
  image({ href: e, title: t, text: n, tokens: r }) {
2010
2019
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
2011
- let i = yi(e);
2020
+ let i = bi(e);
2012
2021
  if (i === null) return V(n);
2013
2022
  e = i;
2014
2023
  let a = `<img src="${V(e)}" alt="${V(n)}"`;
@@ -2017,7 +2026,7 @@ ${e}</tr>
2017
2026
  text(e) {
2018
2027
  return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : V(e.text);
2019
2028
  }
2020
- }, ji = class {
2029
+ }, Mi = class {
2021
2030
  strong({ text: e }) {
2022
2031
  return e;
2023
2032
  }
@@ -2053,7 +2062,7 @@ ${e}</tr>
2053
2062
  renderer;
2054
2063
  textRenderer;
2055
2064
  constructor(e) {
2056
- this.options = e || Xn, this.options.renderer = this.options.renderer || new Ai(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ji();
2065
+ this.options = e || Zn, this.options.renderer = this.options.renderer || new ji(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Mi();
2057
2066
  }
2058
2067
  static parse(t, n) {
2059
2068
  return new e(n).parse(t);
@@ -2201,11 +2210,11 @@ ${e}</tr>
2201
2210
  }
2202
2211
  return n;
2203
2212
  }
2204
- }, Mi = class {
2213
+ }, Ni = class {
2205
2214
  options;
2206
2215
  block;
2207
2216
  constructor(e) {
2208
- this.options = e || Xn;
2217
+ this.options = e || Zn;
2209
2218
  }
2210
2219
  static passThroughHooks = /* @__PURE__ */ new Set([
2211
2220
  "preprocess",
@@ -2237,44 +2246,44 @@ ${e}</tr>
2237
2246
  return e ? U.parse : U.parseInline;
2238
2247
  }
2239
2248
  };
2240
- function Ni(e, t) {
2249
+ function Pi(e, t) {
2241
2250
  if (Array.isArray(t)) for (let n = 0; n < t.length; n++) e.push(t[n]);
2242
2251
  else e.push(t);
2243
2252
  }
2244
- var Pi = new class {
2245
- defaults = Yn();
2253
+ var Fi = new class {
2254
+ defaults = Xn();
2246
2255
  options = this.setOptions;
2247
2256
  parse = this.parseMarkdown(!0);
2248
2257
  parseInline = this.parseMarkdown(!1);
2249
2258
  Parser = U;
2250
- Renderer = Ai;
2251
- TextRenderer = ji;
2259
+ Renderer = ji;
2260
+ TextRenderer = Mi;
2252
2261
  Lexer = H;
2253
- Tokenizer = ki;
2254
- Hooks = Mi;
2262
+ Tokenizer = Ai;
2263
+ Hooks = Ni;
2255
2264
  constructor(...e) {
2256
2265
  this.use(...e);
2257
2266
  }
2258
2267
  walkTokens(e, t) {
2259
2268
  let n = [];
2260
- for (let r of e) switch (Ni(n, t.call(this, r)), r.type) {
2269
+ for (let r of e) switch (Pi(n, t.call(this, r)), r.type) {
2261
2270
  case "table": {
2262
2271
  let e = r;
2263
- for (let r of e.header) Ni(n, this.walkTokens(r.tokens, t));
2264
- for (let r of e.rows) for (let e of r) Ni(n, this.walkTokens(e.tokens, t));
2272
+ for (let r of e.header) Pi(n, this.walkTokens(r.tokens, t));
2273
+ for (let r of e.rows) for (let e of r) Pi(n, this.walkTokens(e.tokens, t));
2265
2274
  break;
2266
2275
  }
2267
2276
  case "list": {
2268
2277
  let e = r;
2269
- Ni(n, this.walkTokens(e.items, t));
2278
+ Pi(n, this.walkTokens(e.items, t));
2270
2279
  break;
2271
2280
  }
2272
2281
  default: {
2273
2282
  let e = r;
2274
2283
  this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2275
2284
  let i = e[r].flat(1 / 0);
2276
- Ni(n, this.walkTokens(i, t));
2277
- }) : e.tokens && Ni(n, this.walkTokens(e.tokens, t));
2285
+ Pi(n, this.walkTokens(i, t));
2286
+ }) : e.tokens && Pi(n, this.walkTokens(e.tokens, t));
2278
2287
  }
2279
2288
  }
2280
2289
  return n;
@@ -2302,7 +2311,7 @@ var Pi = new class {
2302
2311
  }
2303
2312
  "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2304
2313
  }), n.extensions = t), e.renderer) {
2305
- let t = this.defaults.renderer || new Ai(this.defaults);
2314
+ let t = this.defaults.renderer || new ji(this.defaults);
2306
2315
  for (let n in e.renderer) {
2307
2316
  if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2308
2317
  if (["options", "parser"].includes(n)) continue;
@@ -2315,7 +2324,7 @@ var Pi = new class {
2315
2324
  n.renderer = t;
2316
2325
  }
2317
2326
  if (e.tokenizer) {
2318
- let t = this.defaults.tokenizer || new ki(this.defaults);
2327
+ let t = this.defaults.tokenizer || new Ai(this.defaults);
2319
2328
  for (let n in e.tokenizer) {
2320
2329
  if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2321
2330
  if ([
@@ -2332,13 +2341,13 @@ var Pi = new class {
2332
2341
  n.tokenizer = t;
2333
2342
  }
2334
2343
  if (e.hooks) {
2335
- let t = this.defaults.hooks || new Mi();
2344
+ let t = this.defaults.hooks || new Ni();
2336
2345
  for (let n in e.hooks) {
2337
2346
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2338
2347
  if (["options", "block"].includes(n)) continue;
2339
2348
  let r = n, i = e.hooks[r], a = t[r];
2340
- t[r] = Mi.passThroughHooks.has(n) ? (e) => {
2341
- if (this.defaults.async && Mi.passThroughHooksRespectAsync.has(n)) return (async () => {
2349
+ t[r] = Ni.passThroughHooks.has(n) ? (e) => {
2350
+ if (this.defaults.async && Ni.passThroughHooksRespectAsync.has(n)) return (async () => {
2342
2351
  let n = await i.call(t, e);
2343
2352
  return a.call(t, n);
2344
2353
  })();
@@ -2359,7 +2368,7 @@ var Pi = new class {
2359
2368
  let t = this.defaults.walkTokens, r = e.walkTokens;
2360
2369
  n.walkTokens = function(e) {
2361
2370
  let n = [];
2362
- return n.push(r.call(this, e)), t && Ni(n, t.call(this, e)), n;
2371
+ return n.push(r.call(this, e)), t && Pi(n, t.call(this, e)), n;
2363
2372
  };
2364
2373
  }
2365
2374
  this.defaults = {
@@ -2418,31 +2427,31 @@ var Pi = new class {
2418
2427
  }
2419
2428
  }();
2420
2429
  function W(e, t) {
2421
- return Pi.parse(e, t);
2430
+ return Fi.parse(e, t);
2422
2431
  }
2423
2432
  W.options = W.setOptions = function(e) {
2424
- return Pi.setOptions(e), W.defaults = Pi.defaults, Zn(W.defaults), W;
2425
- }, W.getDefaults = Yn, W.defaults = Xn;
2426
- function Fi(...e) {
2427
- return Pi.use(...e), W.defaults = Pi.defaults, Zn(W.defaults), W;
2428
- }
2429
- W.use = Fi, W.walkTokens = function(e, t) {
2430
- return Pi.walkTokens(e, t);
2431
- }, W.parseInline = Pi.parseInline, W.Parser = U, W.parser = U.parse, W.Renderer = Ai, W.TextRenderer = ji, W.Lexer = H, W.lexer = H.lex, W.Tokenizer = ki, W.Hooks = Mi, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, U.parse, H.lex;
2433
+ return Fi.setOptions(e), W.defaults = Fi.defaults, Qn(W.defaults), W;
2434
+ }, W.getDefaults = Xn, W.defaults = Zn;
2435
+ function Ii(...e) {
2436
+ return Fi.use(...e), W.defaults = Fi.defaults, Qn(W.defaults), W;
2437
+ }
2438
+ W.use = Ii, W.walkTokens = function(e, t) {
2439
+ return Fi.walkTokens(e, t);
2440
+ }, W.parseInline = Fi.parseInline, W.Parser = U, W.parser = U.parse, W.Renderer = ji, W.TextRenderer = Mi, W.Lexer = H, W.lexer = H.lex, W.Tokenizer = Ai, W.Hooks = Ni, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, U.parse, H.lex;
2432
2441
  //#endregion
2433
2442
  //#region ../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs
2434
- function Ii(e, t) {
2443
+ function Li(e, t) {
2435
2444
  this.v = e, this.k = t;
2436
2445
  }
2437
- function Li(e, t) {
2446
+ function Ri(e, t) {
2438
2447
  (t == null || t > e.length) && (t = e.length);
2439
2448
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
2440
2449
  return r;
2441
2450
  }
2442
- function Ri(e) {
2451
+ function zi(e) {
2443
2452
  if (Array.isArray(e)) return e;
2444
2453
  }
2445
- function zi(e, t) {
2454
+ function Bi(e, t) {
2446
2455
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2447
2456
  if (n != null) {
2448
2457
  var r, i, a, o, s = [], c = !0, l = !1;
@@ -2463,24 +2472,24 @@ function zi(e, t) {
2463
2472
  return s;
2464
2473
  }
2465
2474
  }
2466
- function Bi() {
2475
+ function Vi() {
2467
2476
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2468
2477
  }
2469
- function Vi(e, t) {
2470
- return Ri(e) || zi(e, t) || Hi(e, t) || Bi();
2471
- }
2472
2478
  function Hi(e, t) {
2479
+ return zi(e) || Bi(e, t) || Ui(e, t) || Vi();
2480
+ }
2481
+ function Ui(e, t) {
2473
2482
  if (e) {
2474
- if (typeof e == "string") return Li(e, t);
2483
+ if (typeof e == "string") return Ri(e, t);
2475
2484
  var n = {}.toString.call(e).slice(8, -1);
2476
- return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Li(e, t) : void 0;
2485
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ri(e, t) : void 0;
2477
2486
  }
2478
2487
  }
2479
- function Ui(e) {
2488
+ function Wi(e) {
2480
2489
  var t, n;
2481
2490
  function r(t, n) {
2482
2491
  try {
2483
- var a = e[t](n), o = a.value, s = o instanceof Ii;
2492
+ var a = e[t](n), o = a.value, s = o instanceof Li;
2484
2493
  Promise.resolve(s ? o.v : o).then(function(n) {
2485
2494
  if (s) {
2486
2495
  var c = t === "return" && o.k ? t : "next";
@@ -2514,119 +2523,119 @@ function Ui(e) {
2514
2523
  });
2515
2524
  }, typeof e.return != "function" && (this.return = void 0);
2516
2525
  }
2517
- Ui.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
2526
+ Wi.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
2518
2527
  return this;
2519
- }, Ui.prototype.next = function(e) {
2528
+ }, Wi.prototype.next = function(e) {
2520
2529
  return this._invoke("next", e);
2521
- }, Ui.prototype.throw = function(e) {
2530
+ }, Wi.prototype.throw = function(e) {
2522
2531
  return this._invoke("throw", e);
2523
- }, Ui.prototype.return = function(e) {
2532
+ }, Wi.prototype.return = function(e) {
2524
2533
  return this._invoke("return", e);
2525
2534
  };
2526
- var Wi = Object.entries, Gi = Object.setPrototypeOf, Ki = Object.isFrozen, qi = Object.getPrototypeOf, Ji = Object.getOwnPropertyDescriptor, G = Object.freeze, K = Object.seal, Yi = Object.create, Xi = typeof Reflect < "u" && Reflect, Zi = Xi.apply, Qi = Xi.construct;
2535
+ var Gi = Object.entries, Ki = Object.setPrototypeOf, qi = Object.isFrozen, Ji = Object.getPrototypeOf, Yi = Object.getOwnPropertyDescriptor, G = Object.freeze, K = Object.seal, Xi = Object.create, Zi = typeof Reflect < "u" && Reflect, Qi = Zi.apply, $i = Zi.construct;
2527
2536
  G ||= function(e) {
2528
2537
  return e;
2529
2538
  }, K ||= function(e) {
2530
2539
  return e;
2531
- }, Zi ||= function(e, t) {
2540
+ }, Qi ||= function(e, t) {
2532
2541
  var n = [...arguments].slice(2);
2533
2542
  return e.apply(t, n);
2534
- }, Qi ||= function(e) {
2543
+ }, $i ||= function(e) {
2535
2544
  return new e(...[...arguments].slice(1));
2536
2545
  };
2537
- var $i = Y(Array.prototype.forEach);
2546
+ var ea = Y(Array.prototype.forEach);
2538
2547
  Array.prototype.indexOf;
2539
- var ea = Y(Array.prototype.lastIndexOf), ta = Y(Array.prototype.pop), na = Y(Array.prototype.push), ra = Y(Array.prototype.slice), ia = Y(Array.prototype.splice), aa = Array.isArray, oa = xa(Set), sa = Y(Set.prototype.add), ca = Y(Set.prototype.has), la = Y(String.prototype.toLowerCase), ua = Y(String.prototype.toString), da = Y(String.prototype.match), fa = Y(String.prototype.replace), pa = Y(String.prototype.indexOf), ma = Y(String.prototype.trim), ha = Y(Number.prototype.toString), ga = Y(Boolean.prototype.toString), _a = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), va = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), ya = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), ba = xa(TypeError);
2548
+ var ta = Y(Array.prototype.lastIndexOf), na = Y(Array.prototype.pop), ra = Y(Array.prototype.push), ia = Y(Array.prototype.slice), aa = Y(Array.prototype.splice), oa = Array.isArray, sa = Sa(Set), ca = Y(Set.prototype.add), la = Y(Set.prototype.has), ua = Y(String.prototype.toLowerCase), da = Y(String.prototype.toString), fa = Y(String.prototype.match), pa = Y(String.prototype.replace), ma = Y(String.prototype.indexOf), ha = Y(String.prototype.trim), ga = Y(Number.prototype.toString), _a = Y(Boolean.prototype.toString), va = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), ya = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), ba = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), xa = Sa(TypeError);
2540
2549
  function Y(e) {
2541
2550
  return function(t) {
2542
2551
  t instanceof RegExp && (t.lastIndex = 0);
2543
2552
  var n = [...arguments].slice(1);
2544
- return Zi(e, t, n);
2553
+ return Qi(e, t, n);
2545
2554
  };
2546
2555
  }
2547
- function xa(e) {
2556
+ function Sa(e) {
2548
2557
  return function() {
2549
- return Qi(e, [...arguments]);
2558
+ return $i(e, [...arguments]);
2550
2559
  };
2551
2560
  }
2552
2561
  function X(e, t) {
2553
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : la;
2554
- if (Gi && Gi(e, null), !aa(t)) return e;
2562
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ua;
2563
+ if (Ki && Ki(e, null), !oa(t)) return e;
2555
2564
  let r = t.length;
2556
2565
  for (; r--;) {
2557
2566
  let i = t[r];
2558
2567
  if (typeof i == "string") {
2559
2568
  let e = n(i);
2560
- e !== i && (Ki(t) || (t[r] = e), i = e);
2569
+ e !== i && (qi(t) || (t[r] = e), i = e);
2561
2570
  }
2562
2571
  e[i] = !0;
2563
2572
  }
2564
2573
  return e;
2565
2574
  }
2566
- function Sa(e) {
2575
+ function Ca(e) {
2567
2576
  for (let t = 0; t < e.length; t++) q(e, t) || (e[t] = null);
2568
2577
  return e;
2569
2578
  }
2570
2579
  function Z(e) {
2571
- let t = Yi(null);
2572
- for (let r of Wi(e)) {
2573
- var n = Vi(r, 2);
2580
+ let t = Xi(null);
2581
+ for (let r of Gi(e)) {
2582
+ var n = Hi(r, 2);
2574
2583
  let i = n[0], a = n[1];
2575
- q(e, i) && (t[i] = aa(a) ? Sa(a) : a && typeof a == "object" && a.constructor === Object ? Z(a) : a);
2584
+ q(e, i) && (t[i] = oa(a) ? Ca(a) : a && typeof a == "object" && a.constructor === Object ? Z(a) : a);
2576
2585
  }
2577
2586
  return t;
2578
2587
  }
2579
- function Ca(e) {
2588
+ function wa(e) {
2580
2589
  switch (typeof e) {
2581
2590
  case "string": return e;
2582
- case "number": return ha(e);
2583
- case "boolean": return ga(e);
2584
- case "bigint": return _a ? _a(e) : "0";
2585
- case "symbol": return va ? va(e) : "Symbol()";
2586
- case "undefined": return ya(e);
2591
+ case "number": return ga(e);
2592
+ case "boolean": return _a(e);
2593
+ case "bigint": return va ? va(e) : "0";
2594
+ case "symbol": return ya ? ya(e) : "Symbol()";
2595
+ case "undefined": return ba(e);
2587
2596
  case "function":
2588
2597
  case "object": {
2589
- if (e === null) return ya(e);
2598
+ if (e === null) return ba(e);
2590
2599
  let t = e, n = Q(t, "toString");
2591
2600
  if (typeof n == "function") {
2592
2601
  let e = n(t);
2593
- return typeof e == "string" ? e : ya(e);
2602
+ return typeof e == "string" ? e : ba(e);
2594
2603
  }
2595
- return ya(e);
2604
+ return ba(e);
2596
2605
  }
2597
- default: return ya(e);
2606
+ default: return ba(e);
2598
2607
  }
2599
2608
  }
2600
2609
  function Q(e, t) {
2601
2610
  for (; e !== null;) {
2602
- let n = Ji(e, t);
2611
+ let n = Yi(e, t);
2603
2612
  if (n) {
2604
2613
  if (n.get) return Y(n.get);
2605
2614
  if (typeof n.value == "function") return Y(n.value);
2606
2615
  }
2607
- e = qi(e);
2616
+ e = Ji(e);
2608
2617
  }
2609
2618
  function n() {
2610
2619
  return null;
2611
2620
  }
2612
2621
  return n;
2613
2622
  }
2614
- function wa(e, t) {
2623
+ function Ta(e, t) {
2615
2624
  for (; e !== null;) {
2616
- let n = Ji(e, t);
2625
+ let n = Yi(e, t);
2617
2626
  if (n) return n.get ? Y(n.get) : null;
2618
- e = qi(e);
2627
+ e = Ji(e);
2619
2628
  }
2620
2629
  return null;
2621
2630
  }
2622
- function Ta(e) {
2631
+ function Ea(e) {
2623
2632
  try {
2624
2633
  return J(e, ""), !0;
2625
2634
  } catch {
2626
2635
  return !1;
2627
2636
  }
2628
2637
  }
2629
- var Ea = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Da = G(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Oa = G([
2638
+ var Da = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Oa = G(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), ka = G([
2630
2639
  "feBlend",
2631
2640
  "feColorMatrix",
2632
2641
  "feComponentTransfer",
@@ -2652,7 +2661,7 @@ var Ea = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2652
2661
  "feSpotLight",
2653
2662
  "feTile",
2654
2663
  "feTurbulence"
2655
- ]), ka = G([
2664
+ ]), Aa = G([
2656
2665
  "animate",
2657
2666
  "color-profile",
2658
2667
  "cursor",
@@ -2675,7 +2684,7 @@ var Ea = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2675
2684
  "solidcolor",
2676
2685
  "unknown",
2677
2686
  "use"
2678
- ]), Aa = G(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), ja = G([
2687
+ ]), ja = G(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Ma = G([
2679
2688
  "maction",
2680
2689
  "maligngroup",
2681
2690
  "malignmark",
@@ -2691,13 +2700,13 @@ var Ea = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2691
2700
  "annotation-xml",
2692
2701
  "mprescripts",
2693
2702
  "none"
2694
- ]), Ma = G(["#text"]), Na = G(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Pa = G(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Fa = G(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Ia = G([
2703
+ ]), Na = G(["#text"]), Pa = G(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Fa = G(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ia = G(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), La = G([
2695
2704
  "xlink:href",
2696
2705
  "xml:id",
2697
2706
  "xlink:title",
2698
2707
  "xml:space",
2699
2708
  "xmlns:xlink"
2700
- ]), La = K(/{{[\w\W]*|^[\w\W]*}}/g), Ra = K(/<%[\w\W]*|^[\w\W]*%>/g), za = K(/\${[\w\W]*/g), Ba = K(/^data-[\-\w.\u00B7-\uFFFF]+$/), Va = K(/^aria-[\-\w]+$/), Ha = K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ua = K(/^(?:\w+script|data):/i), Wa = K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ga = K(/^html$/i), Ka = K(/^[a-z][.\w]*(-[.\w]+)+$/i), qa = K(/<[/\w!]/g), Ja = K(/<[/\w]/g), Ya = K(/<\/no(script|embed|frames)/i), Xa = K(/\/>/i), $ = {
2709
+ ]), Ra = K(/{{[\w\W]*|^[\w\W]*}}/g), za = K(/<%[\w\W]*|^[\w\W]*%>/g), Ba = K(/\${[\w\W]*/g), Va = K(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ha = K(/^aria-[\-\w]+$/), Ua = K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Wa = K(/^(?:\w+script|data):/i), Ga = K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ka = K(/^html$/i), qa = K(/^[a-z][.\w]*(-[.\w]+)+$/i), Ja = K(/<[/\w!]/g), Ya = K(/<[/\w]/g), Xa = K(/<\/no(script|embed|frames)/i), Za = K(/\/>/i), $ = {
2701
2710
  element: 1,
2702
2711
  attribute: 2,
2703
2712
  text: 3,
@@ -2710,7 +2719,7 @@ var Ea = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2710
2719
  documentType: 10,
2711
2720
  documentFragment: 11,
2712
2721
  notation: 12
2713
- }, Za = G(X({}, [
2722
+ }, Qa = G(X({}, [
2714
2723
  "style",
2715
2724
  "script",
2716
2725
  "xmp",
@@ -2719,9 +2728,9 @@ var Ea = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2719
2728
  "noframes",
2720
2729
  "plaintext",
2721
2730
  "noscript"
2722
- ])), Qa = function() {
2731
+ ])), $a = function() {
2723
2732
  return typeof window > "u" ? null : window;
2724
- }, $a = function(e, t) {
2733
+ }, eo = function(e, t) {
2725
2734
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
2726
2735
  let n = null, r = "data-tt-policy-suffix";
2727
2736
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -2738,7 +2747,7 @@ var Ea = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2738
2747
  } catch {
2739
2748
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
2740
2749
  }
2741
- }, eo = function() {
2750
+ }, to = function() {
2742
2751
  return {
2743
2752
  afterSanitizeAttributes: [],
2744
2753
  afterSanitizeElements: [],
@@ -2750,62 +2759,62 @@ var Ea = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2750
2759
  uponSanitizeElement: [],
2751
2760
  uponSanitizeShadowNode: []
2752
2761
  };
2753
- }, to = function(e, t, n, r) {
2754
- return q(e, t) && aa(e[t]) ? X(r.base ? Z(r.base) : {}, e[t], r.transform) : n;
2755
- }, no = function(e, t, n) {
2762
+ }, no = function(e, t, n, r) {
2763
+ return q(e, t) && oa(e[t]) ? X(r.base ? Z(r.base) : {}, e[t], r.transform) : n;
2764
+ }, ro = function(e, t, n) {
2756
2765
  let r = q(e, t) ? e[t] : void 0;
2757
2766
  return r && typeof r == "object" ? Z(r) : n();
2758
2767
  };
2759
- function ro() {
2760
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qa(), t = (e) => ro(e);
2768
+ function io() {
2769
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : $a(), t = (e) => io(e);
2761
2770
  if (t.version = "3.4.17", t.removed = [], !e || !e.document || e.document.nodeType !== $.document || !e.Element) return t.isSupported = !1, t;
2762
2771
  let n = e.document, r = n, i = r.currentScript;
2763
2772
  e.DocumentFragment;
2764
2773
  let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
2765
2774
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
2766
- let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Q(d, "cloneNode"), p = Q(d, "remove"), ee = Q(d, "removeAttributeNode"), m = Q(d, "nextSibling"), te = Q(d, "childNodes"), ne = Q(d, "parentNode"), re = Q(d, "shadowRoot"), ie = Q(d, "attributes"), ae = o && o.prototype ? Q(o.prototype, "nodeType") : null, oe = o && o.prototype ? Q(o.prototype, "nodeName") : null, se = o && o.prototype ? Q(o.prototype, "ownerDocument") : null, h = function(e) {
2775
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Q(d, "cloneNode"), p = Q(d, "remove"), ee = Q(d, "removeAttributeNode"), m = Q(d, "nextSibling"), te = Q(d, "childNodes"), ne = Q(d, "parentNode"), re = Q(d, "shadowRoot"), ie = Q(d, "attributes"), ae = o && o.prototype ? Q(o.prototype, "nodeType") : null, h = o && o.prototype ? Q(o.prototype, "nodeName") : null, oe = o && o.prototype ? Q(o.prototype, "ownerDocument") : null, g = function(e) {
2767
2776
  return ae ? ae(e) : e.nodeType;
2768
- }, ce = function(e) {
2769
- return oe ? oe(e) : e.nodeName;
2770
- }, le = wa(d, "namespaceURI"), g = function(e) {
2771
- return le ? le(e) : e.namespaceURI;
2777
+ }, se = function(e) {
2778
+ return h ? h(e) : e.nodeName;
2779
+ }, ce = Ta(d, "namespaceURI"), _ = function(e) {
2780
+ return ce ? ce(e) : e.namespaceURI;
2772
2781
  };
2773
2782
  if (typeof a == "function") {
2774
2783
  let e = n.createElement("template");
2775
2784
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
2776
2785
  }
2777
- let _, v = "", ue, de = !1, fe = 0, pe = function() {
2778
- if (fe > 0) throw ba("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
2779
- }, me = function(e) {
2780
- pe(), fe++;
2786
+ let v, y = "", le, ue = !1, de = 0, fe = function() {
2787
+ if (de > 0) throw xa("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
2788
+ }, pe = function(e) {
2789
+ fe(), de++;
2781
2790
  try {
2782
- return _.createHTML(e);
2791
+ return v.createHTML(e);
2783
2792
  } finally {
2784
- fe--;
2793
+ de--;
2785
2794
  }
2786
- }, he = function(e) {
2787
- pe(), fe++;
2795
+ }, me = function(e) {
2796
+ fe(), de++;
2788
2797
  try {
2789
- return _.createScriptURL(e);
2798
+ return v.createScriptURL(e);
2790
2799
  } finally {
2791
- fe--;
2792
- }
2793
- }, y = function() {
2794
- return de ||= (ue = $a(u, i), !0), ue;
2795
- }, ge = n, _e = ge.implementation, ve = ge.createNodeIterator, ye = ge.createDocumentFragment, be = ge.getElementsByTagName, xe = r.importNode, b = eo();
2796
- t.isSupported = typeof Wi == "function" && typeof ne == "function" && _e && _e.createHTMLDocument !== void 0;
2797
- let Se = La, Ce = Ra, we = za, Te = Ba, Ee = Va, De = Ua, Oe = Wa, ke = Ka, Ae = Ha, x = null, je = X({}, [
2798
- ...Ea,
2800
+ de--;
2801
+ }
2802
+ }, b = function() {
2803
+ return ue ||= (le = eo(u, i), !0), le;
2804
+ }, he = n, ge = he.implementation, _e = he.createNodeIterator, ve = he.createDocumentFragment, ye = he.getElementsByTagName, be = r.importNode, x = to();
2805
+ t.isSupported = typeof Gi == "function" && typeof ne == "function" && ge && ge.createHTMLDocument !== void 0;
2806
+ let xe = Ra, Se = za, Ce = Ba, we = Va, Te = Ha, Ee = Wa, De = Ga, Oe = qa, ke = Ua, S = null, Ae = X({}, [
2799
2807
  ...Da,
2800
2808
  ...Oa,
2801
- ...Aa,
2802
- ...Ma
2803
- ]), S = null, Me = X({}, [
2804
- ...Na,
2809
+ ...ka,
2810
+ ...ja,
2811
+ ...Na
2812
+ ]), C = null, je = X({}, [
2805
2813
  ...Pa,
2806
2814
  ...Fa,
2807
- ...Ia
2808
- ]), C = Object.seal(Yi(null, {
2815
+ ...Ia,
2816
+ ...La
2817
+ ]), w = Object.seal(Xi(null, {
2809
2818
  tagNameCheck: {
2810
2819
  writable: !0,
2811
2820
  configurable: !1,
@@ -2824,7 +2833,7 @@ function ro() {
2824
2833
  enumerable: !0,
2825
2834
  value: !1
2826
2835
  }
2827
- })), Ne = null, Pe = null, w = Object.seal(Yi(null, {
2836
+ })), Me = null, Ne = null, Pe = Object.seal(Xi(null, {
2828
2837
  tagCheck: {
2829
2838
  writable: !0,
2830
2839
  configurable: !1,
@@ -2837,14 +2846,14 @@ function ro() {
2837
2846
  enumerable: !0,
2838
2847
  value: null
2839
2848
  }
2840
- })), Fe = !0, Ie = !0, Le = !1, T = !0, E = !1, Re = !0, ze = !1, Be = !1, Ve = null, He = null, Ue = !1, We = !1, Ge = !1, Ke = !1, qe = !0, Je = !1, D = "user-content-", Ye = !0, Xe = !1, Ze = null, Qe = {}, $e = null, et = X({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), tt = null, nt = X({}, [
2849
+ })), Fe = !0, Ie = !0, Le = !1, Re = !0, T = !1, ze = !0, Be = !1, Ve = !1, He = null, Ue = null, We = !1, Ge = !1, Ke = !1, qe = !1, Je = !0, Ye = !1, Xe = "user-content-", E = !0, Ze = !1, Qe = null, $e = {}, et = null, tt = X({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), nt = null, rt = X({}, [
2841
2850
  "audio",
2842
2851
  "video",
2843
2852
  "img",
2844
2853
  "source",
2845
2854
  "image",
2846
2855
  "track"
2847
- ]), rt = null, it = X({}, [
2856
+ ]), it = null, at = X({}, [
2848
2857
  "alt",
2849
2858
  "class",
2850
2859
  "for",
@@ -2859,72 +2868,72 @@ function ro() {
2859
2868
  "value",
2860
2869
  "style",
2861
2870
  "xmlns"
2862
- ]), at = "http://www.w3.org/1998/Math/MathML", ot = "http://www.w3.org/2000/svg", O = "http://www.w3.org/1999/xhtml", st = O, ct = !1, lt = null, ut = X({}, [
2863
- at,
2871
+ ]), ot = "http://www.w3.org/1998/Math/MathML", st = "http://www.w3.org/2000/svg", D = "http://www.w3.org/1999/xhtml", ct = D, lt = !1, ut = null, dt = X({}, [
2864
2872
  ot,
2865
- O
2866
- ], ua), k = G([
2873
+ st,
2874
+ D
2875
+ ], da), ft = G([
2867
2876
  "mi",
2868
2877
  "mo",
2869
2878
  "mn",
2870
2879
  "ms",
2871
2880
  "mtext"
2872
- ]), dt = X({}, k), ft = G(["annotation-xml"]), pt = X({}, ft), mt = X({}, [
2881
+ ]), O = X({}, ft), pt = G(["annotation-xml"]), mt = X({}, pt), ht = X({}, [
2873
2882
  "title",
2874
2883
  "style",
2875
2884
  "font",
2876
2885
  "a",
2877
2886
  "script"
2878
- ]), ht = null, gt = ["application/xhtml+xml", "text/html"], A = null, _t = null, vt = n.createElement("form"), yt = function(e) {
2887
+ ]), gt = null, _t = ["application/xhtml+xml", "text/html"], k = null, vt = null, yt = n.createElement("form"), bt = function(e) {
2879
2888
  return e instanceof RegExp || e instanceof Function;
2880
- }, bt = function() {
2889
+ }, xt = function() {
2881
2890
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2882
- if (_t && _t === e) return;
2883
- (!e || typeof e != "object") && (e = {}), e = Z(e), ht = gt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, A = ht === "application/xhtml+xml" ? ua : la, x = to(e, "ALLOWED_TAGS", je, { transform: A }), S = to(e, "ALLOWED_ATTR", Me, { transform: A }), lt = to(e, "ALLOWED_NAMESPACES", ut, { transform: ua }), rt = to(e, "ADD_URI_SAFE_ATTR", it, {
2884
- transform: A,
2885
- base: it
2886
- }), tt = to(e, "ADD_DATA_URI_TAGS", nt, {
2887
- transform: A,
2888
- base: nt
2889
- }), $e = to(e, "FORBID_CONTENTS", et, { transform: A }), Ne = to(e, "FORBID_TAGS", Z({}), { transform: A }), Pe = to(e, "FORBID_ATTR", Z({}), { transform: A }), Qe = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, Fe = e.ALLOW_ARIA_ATTR !== !1, Ie = e.ALLOW_DATA_ATTR !== !1, Le = e.ALLOW_UNKNOWN_PROTOCOLS || !1, T = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, E = e.SAFE_FOR_TEMPLATES || !1, Re = e.SAFE_FOR_XML !== !1, ze = e.WHOLE_DOCUMENT || !1, We = e.RETURN_DOM || !1, Ge = e.RETURN_DOM_FRAGMENT || !1, Ke = e.RETURN_TRUSTED_TYPE || !1, Ue = e.FORCE_BODY || !1, qe = e.SANITIZE_DOM !== !1, Je = e.SANITIZE_NAMED_PROPS || !1, Ye = e.KEEP_CONTENT !== !1, Xe = e.IN_PLACE || !1, Ae = Ta(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ha, st = typeof e.NAMESPACE == "string" ? e.NAMESPACE : O, dt = no(e, "MATHML_TEXT_INTEGRATION_POINTS", () => X({}, k)), pt = no(e, "HTML_INTEGRATION_POINTS", () => X({}, ft));
2890
- let t = no(e, "CUSTOM_ELEMENT_HANDLING", () => Yi(null));
2891
- if (C = Yi(null), q(t, "tagNameCheck") && yt(t.tagNameCheck) && (C.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && yt(t.attributeNameCheck) && (C.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (C.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), K(C), E && (Ie = !1), Ge && (We = !0), Qe && (x = X({}, Ma), S = Yi(null), Qe.html === !0 && (X(x, Ea), X(S, Na)), Qe.svg === !0 && (X(x, Da), X(S, Pa), X(S, Ia)), Qe.svgFilters === !0 && (X(x, Oa), X(S, Pa), X(S, Ia)), Qe.mathMl === !0 && (X(x, Aa), X(S, Fa), X(S, Ia))), w.tagCheck = null, w.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? w.tagCheck = e.ADD_TAGS : aa(e.ADD_TAGS) && (x === je && (x = Z(x)), X(x, e.ADD_TAGS, A))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? w.attributeCheck = e.ADD_ATTR : aa(e.ADD_ATTR) && (S === Me && (S = Z(S)), X(S, e.ADD_ATTR, A))), q(e, "ADD_FORBID_CONTENTS") && aa(e.ADD_FORBID_CONTENTS) && ($e === et && ($e = Z($e)), X($e, e.ADD_FORBID_CONTENTS, A)), Ye && (x["#text"] = !0), ze && X(x, [
2891
+ if (vt && vt === e) return;
2892
+ (!e || typeof e != "object") && (e = {}), e = Z(e), gt = _t.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, k = gt === "application/xhtml+xml" ? da : ua, S = no(e, "ALLOWED_TAGS", Ae, { transform: k }), C = no(e, "ALLOWED_ATTR", je, { transform: k }), ut = no(e, "ALLOWED_NAMESPACES", dt, { transform: da }), it = no(e, "ADD_URI_SAFE_ATTR", at, {
2893
+ transform: k,
2894
+ base: at
2895
+ }), nt = no(e, "ADD_DATA_URI_TAGS", rt, {
2896
+ transform: k,
2897
+ base: rt
2898
+ }), et = no(e, "FORBID_CONTENTS", tt, { transform: k }), Me = no(e, "FORBID_TAGS", Z({}), { transform: k }), Ne = no(e, "FORBID_ATTR", Z({}), { transform: k }), $e = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, Fe = e.ALLOW_ARIA_ATTR !== !1, Ie = e.ALLOW_DATA_ATTR !== !1, Le = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Re = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, T = e.SAFE_FOR_TEMPLATES || !1, ze = e.SAFE_FOR_XML !== !1, Be = e.WHOLE_DOCUMENT || !1, Ge = e.RETURN_DOM || !1, Ke = e.RETURN_DOM_FRAGMENT || !1, qe = e.RETURN_TRUSTED_TYPE || !1, We = e.FORCE_BODY || !1, Je = e.SANITIZE_DOM !== !1, Ye = e.SANITIZE_NAMED_PROPS || !1, E = e.KEEP_CONTENT !== !1, Ze = e.IN_PLACE || !1, ke = Ea(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ua, ct = typeof e.NAMESPACE == "string" ? e.NAMESPACE : D, O = ro(e, "MATHML_TEXT_INTEGRATION_POINTS", () => X({}, ft)), mt = ro(e, "HTML_INTEGRATION_POINTS", () => X({}, pt));
2899
+ let t = ro(e, "CUSTOM_ELEMENT_HANDLING", () => Xi(null));
2900
+ if (w = Xi(null), q(t, "tagNameCheck") && bt(t.tagNameCheck) && (w.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && bt(t.attributeNameCheck) && (w.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (w.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), K(w), T && (Ie = !1), Ke && (Ge = !0), $e && (S = X({}, Na), C = Xi(null), $e.html === !0 && (X(S, Da), X(C, Pa)), $e.svg === !0 && (X(S, Oa), X(C, Fa), X(C, La)), $e.svgFilters === !0 && (X(S, ka), X(C, Fa), X(C, La)), $e.mathMl === !0 && (X(S, ja), X(C, Ia), X(C, La))), Pe.tagCheck = null, Pe.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Pe.tagCheck = e.ADD_TAGS : oa(e.ADD_TAGS) && (S === Ae && (S = Z(S)), X(S, e.ADD_TAGS, k))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Pe.attributeCheck = e.ADD_ATTR : oa(e.ADD_ATTR) && (C === je && (C = Z(C)), X(C, e.ADD_ATTR, k))), q(e, "ADD_FORBID_CONTENTS") && oa(e.ADD_FORBID_CONTENTS) && (et === tt && (et = Z(et)), X(et, e.ADD_FORBID_CONTENTS, k)), E && (S["#text"] = !0), Be && X(S, [
2892
2901
  "html",
2893
2902
  "head",
2894
2903
  "body"
2895
- ]), x.table && (X(x, ["tbody"]), delete Ne.tbody), e.TRUSTED_TYPES_POLICY) {
2896
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw ba("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
2897
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw ba("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
2898
- let t = _;
2899
- _ = e.TRUSTED_TYPES_POLICY;
2904
+ ]), S.table && (X(S, ["tbody"]), delete Me.tbody), e.TRUSTED_TYPES_POLICY) {
2905
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw xa("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
2906
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw xa("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
2907
+ let t = v;
2908
+ v = e.TRUSTED_TYPES_POLICY;
2900
2909
  try {
2901
- v = me("");
2910
+ y = pe("");
2902
2911
  } catch (e) {
2903
- throw _ = t, e;
2912
+ throw v = t, e;
2904
2913
  }
2905
- } else e.TRUSTED_TYPES_POLICY === null ? (_ = void 0, v = "") : (_ === void 0 && (_ = y()), _ && typeof v == "string" && (v = me("")));
2906
- G && G(e), _t = e;
2907
- }, xt = X({}, [
2908
- ...Da,
2914
+ } else e.TRUSTED_TYPES_POLICY === null ? (v = void 0, y = "") : (v === void 0 && (v = b()), v && typeof y == "string" && (y = pe("")));
2915
+ G && G(e), vt = e;
2916
+ }, St = X({}, [
2909
2917
  ...Oa,
2910
- ...ka
2911
- ]), St = X({}, [...Aa, ...ja]), Ct = function(e, t, n) {
2912
- return t.namespaceURI === O ? e === "svg" : t.namespaceURI === at ? e === "svg" && (n === "annotation-xml" || dt[n]) : !!xt[e];
2913
- }, wt = function(e, t, n) {
2914
- return t.namespaceURI === O ? e === "math" : t.namespaceURI === ot ? e === "math" && pt[n] : !!St[e];
2918
+ ...ka,
2919
+ ...Aa
2920
+ ]), Ct = X({}, [...ja, ...Ma]), wt = function(e, t, n) {
2921
+ return t.namespaceURI === D ? e === "svg" : t.namespaceURI === ot ? e === "svg" && (n === "annotation-xml" || O[n]) : !!St[e];
2915
2922
  }, Tt = function(e, t, n) {
2916
- return t.namespaceURI === ot && !pt[n] || t.namespaceURI === at && !dt[n] ? !1 : !St[e] && (mt[e] || !xt[e]);
2917
- }, Et = function(e) {
2918
- let t = g(e), n = la(ce(e)), r = ne(e), i, a;
2919
- return r && h(r) === $.element ? (i = { namespaceURI: g(r) }, a = la(ce(r))) : (i = { namespaceURI: st }, a = "template"), lt[t] ? t === ot ? Ct(n, i, a) : t === at ? wt(n, i, a) : t === O ? Tt(n, i, a) : !!(ht === "application/xhtml+xml" && lt[t]) : !1;
2920
- }, j = function(e) {
2921
- na(t.removed, { element: e });
2923
+ return t.namespaceURI === D ? e === "math" : t.namespaceURI === st ? e === "math" && mt[n] : !!Ct[e];
2924
+ }, Et = function(e, t, n) {
2925
+ return t.namespaceURI === st && !mt[n] || t.namespaceURI === ot && !O[n] ? !1 : !Ct[e] && (ht[e] || !St[e]);
2926
+ }, Dt = function(e) {
2927
+ let t = _(e), n = ua(se(e)), r = ne(e), i, a;
2928
+ return r && g(r) === $.element ? (i = { namespaceURI: _(r) }, a = ua(se(r))) : (i = { namespaceURI: ct }, a = "template"), ut[t] ? t === st ? wt(n, i, a) : t === ot ? Tt(n, i, a) : t === D ? Et(n, i, a) : !!(gt === "application/xhtml+xml" && ut[t]) : !1;
2929
+ }, A = function(e) {
2930
+ ra(t.removed, { element: e });
2922
2931
  try {
2923
2932
  ne(e).removeChild(e);
2924
2933
  } catch {
2925
- if (p(e), !ne(e)) throw ba("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2934
+ if (p(e), !ne(e)) throw xa("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2926
2935
  }
2927
- }, M = function(e, t, n) {
2936
+ }, j = function(e, t, n) {
2928
2937
  try {
2929
2938
  ee(e, t);
2930
2939
  } catch {
@@ -2932,18 +2941,18 @@ function ro() {
2932
2941
  e.removeAttribute(n);
2933
2942
  } catch {}
2934
2943
  }
2935
- }, Dt = function(e) {
2944
+ }, M = function(e) {
2936
2945
  At(e);
2937
2946
  let t = te(e);
2938
- t && $i(ra(t), (e) => {
2947
+ t && ea(ia(t), (e) => {
2939
2948
  try {
2940
2949
  p(e);
2941
2950
  } catch {}
2942
2951
  });
2943
- let n = h(e) === $.element ? ie(e) : null;
2952
+ let n = g(e) === $.element ? ie(e) : null;
2944
2953
  if (n) for (let t = n.length - 1; t >= 0; --t) {
2945
2954
  let r = n[t], i = r && r.name;
2946
- typeof i == "string" && M(e, r, i);
2955
+ typeof i == "string" && j(e, r, i);
2947
2956
  }
2948
2957
  }, Ot = function(e, n, r) {
2949
2958
  if (!r) try {
@@ -2951,7 +2960,7 @@ function ro() {
2951
2960
  } catch {
2952
2961
  r = null;
2953
2962
  }
2954
- na(t.removed, {
2963
+ ra(t.removed, {
2955
2964
  attribute: r || null,
2956
2965
  from: n
2957
2966
  });
@@ -2963,25 +2972,25 @@ function ro() {
2963
2972
  } catch {}
2964
2973
  }
2965
2974
  if (e === "is") {
2966
- if (We || Ge) try {
2967
- j(n);
2975
+ if (Ge || Ke) try {
2976
+ A(n);
2968
2977
  } catch {}
2969
2978
  else try {
2970
2979
  n.setAttribute(e, "");
2971
2980
  } catch {}
2972
2981
  }
2973
- }, N = function(e) {
2982
+ }, kt = function(e) {
2974
2983
  let t = ie(e);
2975
2984
  if (t) for (let n = t.length - 1; n >= 0; --n) {
2976
2985
  let r = t[n], i = r && r.name;
2977
- typeof i != "string" || S[A(i)] || M(e, r, i);
2986
+ typeof i != "string" || C[k(i)] || j(e, r, i);
2978
2987
  }
2979
- }, kt = function(e, t) {
2988
+ }, N = function(e, t) {
2980
2989
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = [e];
2981
2990
  for (; r.length > 0;) {
2982
2991
  let e = r.pop();
2983
2992
  if (t(e) === !1) continue;
2984
- if (n && h(e) === $.element) {
2993
+ if (n && g(e) === $.element) {
2985
2994
  let t = re(e);
2986
2995
  F(t) && r.push(t);
2987
2996
  }
@@ -2989,58 +2998,58 @@ function ro() {
2989
2998
  if (i) for (let e = i.length - 1; e >= 0; --e) r.push(i[e]);
2990
2999
  }
2991
3000
  }, At = function(e) {
2992
- kt(e, (e) => {
2993
- h(e) === $.element && N(e);
3001
+ N(e, (e) => {
3002
+ g(e) === $.element && kt(e);
2994
3003
  });
2995
3004
  }, jt = function(e) {
2996
3005
  let t = [];
2997
- return kt(e, (e) => {
3006
+ return N(e, (e) => {
2998
3007
  t.push(e);
2999
3008
  }, !0), t;
3000
3009
  }, Mt = function(e, t) {
3001
- let n = oa();
3002
- $i(jt(e), (e) => {
3003
- h(e) === $.element && sa(n, e);
3004
- }), $i(t, (e) => {
3005
- h(e) === $.element && !ca(n, e) && N(e);
3010
+ let n = sa();
3011
+ ea(jt(e), (e) => {
3012
+ g(e) === $.element && ca(n, e);
3013
+ }), ea(t, (e) => {
3014
+ g(e) === $.element && !la(n, e) && kt(e);
3006
3015
  });
3007
3016
  }, Nt = function(e, n) {
3008
3017
  let r = !1;
3009
- return $i(t.removed, (t) => {
3018
+ return ea(t.removed, (t) => {
3010
3019
  t.element && (r ||= t.element === e, At(t.element));
3011
3020
  }), Mt(e, n), r;
3012
3021
  }, Pt = function(e, t) {
3013
- let n = Ze, r = null, i = () => (r || (r = oa(), $i(t, (e) => {
3014
- sa(r, e);
3022
+ let n = Qe, r = null, i = () => (r || (r = sa(), ea(t, (e) => {
3023
+ ca(r, e);
3015
3024
  })), r);
3016
3025
  for (let t = 0;; t++) {
3017
3026
  let r = jt(e), a = [e], o = !1;
3018
- if ($i(r, (e) => {
3019
- h(e) === $.documentFragment ? na(a, e) : !o && !ca(n, e) && (o = ca(i(), e));
3027
+ if (ea(r, (e) => {
3028
+ g(e) === $.documentFragment ? ra(a, e) : !o && !la(n, e) && (o = la(i(), e));
3020
3029
  }), !o) return;
3021
- if (t >= 8) throw ba("the tree kept changing during in-place sanitization; refusing to return it");
3022
- $i(a, (t, n) => {
3030
+ if (t >= 8) throw xa("the tree kept changing during in-place sanitization; refusing to return it");
3031
+ ea(a, (t, n) => {
3023
3032
  Ft(t, n > 0, e, i());
3024
3033
  });
3025
3034
  }
3026
3035
  }, Ft = function(e, t, n, r) {
3027
3036
  let i = Bt(e), a;
3028
- for (; a = i.nextNode();) ca(r, a) && !ca(Ze, a) && (t && I(b.uponSanitizeShadowNode, a, null), Xt(a, n), rn(a, n), F(a.content) && an(a.content));
3037
+ for (; a = i.nextNode();) la(r, a) && !la(Qe, a) && (t && I(x.uponSanitizeShadowNode, a, null), Xt(a, n), rn(a, n), F(a.content) && an(a.content));
3029
3038
  }, It = function(e) {
3030
- Ze && sa(Ze, e);
3039
+ Qe && ca(Qe, e);
3031
3040
  }, Lt = function(e, t) {
3032
- return Re ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
3041
+ return ze ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
3033
3042
  }, Rt = function(e) {
3034
- Re && kt(e, (e) => {
3035
- let t = h(e);
3036
- if (t === $.processingInstruction || t === $.comment && J(Ja, e.data)) {
3043
+ ze && N(e, (e) => {
3044
+ let t = g(e);
3045
+ if (t === $.processingInstruction || t === $.comment && J(Ya, e.data)) {
3037
3046
  try {
3038
3047
  p(e);
3039
3048
  } catch {}
3040
3049
  return !1;
3041
3050
  }
3042
3051
  if (t === $.element) {
3043
- let t = e, n = A(ce(e));
3052
+ let t = e, n = k(se(e));
3044
3053
  try {
3045
3054
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Lt("for", n) && t.removeAttribute("for");
3046
3055
  } catch {}
@@ -3049,42 +3058,42 @@ function ro() {
3049
3058
  });
3050
3059
  }, zt = function(e) {
3051
3060
  let t = null, r = null;
3052
- if (Ue) e = "<remove></remove>" + e;
3061
+ if (We) e = "<remove></remove>" + e;
3053
3062
  else {
3054
- let t = da(e, /^[\r\n\t ]+/);
3063
+ let t = fa(e, /^[\r\n\t ]+/);
3055
3064
  r = t && t[0];
3056
3065
  }
3057
- ht === "application/xhtml+xml" && st === O && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
3058
- let i = _ ? me(e) : e;
3059
- if (st === O) try {
3060
- t = new l().parseFromString(i, ht);
3066
+ gt === "application/xhtml+xml" && ct === D && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
3067
+ let i = v ? pe(e) : e;
3068
+ if (ct === D) try {
3069
+ t = new l().parseFromString(i, gt);
3061
3070
  } catch {}
3062
3071
  if (!t || !t.documentElement) {
3063
- t = _e.createDocument(st, "template", null);
3072
+ t = ge.createDocument(ct, "template", null);
3064
3073
  try {
3065
- t.documentElement.innerHTML = ct ? v : i;
3074
+ t.documentElement.innerHTML = lt ? y : i;
3066
3075
  } catch {}
3067
3076
  }
3068
3077
  let a = t.body || t.documentElement;
3069
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), st === O ? be.call(t, ze ? "html" : "body")[0] : ze ? t.documentElement : a;
3078
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), ct === D ? ye.call(t, Be ? "html" : "body")[0] : Be ? t.documentElement : a;
3070
3079
  }, Bt = function(e) {
3071
- let t = se ? se(e) : e.ownerDocument;
3072
- return ve.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
3073
- }, P = function(e) {
3074
- return e = fa(e, Se, " "), e = fa(e, Ce, " "), e = fa(e, we, " "), e;
3080
+ let t = oe ? oe(e) : e.ownerDocument;
3081
+ return _e.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
3075
3082
  }, Vt = function(e) {
3083
+ return e = pa(e, xe, " "), e = pa(e, Se, " "), e = pa(e, Ce, " "), e;
3084
+ }, P = function(e) {
3076
3085
  Ht(e);
3077
3086
  let t = e.querySelectorAll?.call(e, "template");
3078
- t && $i(t, (e) => {
3079
- F(e.content) && Vt(e.content);
3087
+ t && ea(t, (e) => {
3088
+ F(e.content) && P(e.content);
3080
3089
  });
3081
3090
  }, Ht = function(e) {
3082
3091
  e.normalize();
3083
- let t = se ? se(e) : e.ownerDocument, n = ve.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
3084
- for (; r;) r.data = P(r.data), r = n.nextNode();
3092
+ let t = oe ? oe(e) : e.ownerDocument, n = _e.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
3093
+ for (; r;) r.data = Vt(r.data), r = n.nextNode();
3085
3094
  }, Ut = function(e) {
3086
- let t = oe ? oe(e) : null;
3087
- return typeof t != "string" || A(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ie(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== ae(e) || e.childNodes !== te(e);
3095
+ let t = h ? h(e) : null;
3096
+ return typeof t != "string" || k(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ie(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== ae(e) || e.childNodes !== te(e);
3088
3097
  }, F = function(e) {
3089
3098
  if (!ae || typeof e != "object" || !e) return !1;
3090
3099
  try {
@@ -3101,17 +3110,17 @@ function ro() {
3101
3110
  }
3102
3111
  };
3103
3112
  function I(e, n, r) {
3104
- e.length !== 0 && $i(e, (e) => {
3105
- e.call(t, n, r, _t);
3113
+ e.length !== 0 && ea(e, (e) => {
3114
+ e.call(t, n, r, vt);
3106
3115
  });
3107
3116
  }
3108
3117
  let Gt = function(e, t) {
3109
- return !!(Re && e.hasChildNodes() && !Wt(e.firstElementChild) && J(qa, e.textContent) && J(qa, e.innerHTML) || Re && Za[t] && h(e) === $.element && g(e) === O && (Wt(e.firstElementChild) || typeof e.textContent == "string" && J(qa, e.textContent)) || e.nodeType === $.processingInstruction || Re && e.nodeType === $.comment && J(Ja, e.data));
3118
+ return !!(ze && e.hasChildNodes() && !Wt(e.firstElementChild) && J(Ja, e.textContent) && J(Ja, e.innerHTML) || ze && Qa[t] && g(e) === $.element && _(e) === D && (Wt(e.firstElementChild) || typeof e.textContent == "string" && J(Ja, e.textContent)) || e.nodeType === $.processingInstruction || ze && e.nodeType === $.comment && J(Ya, e.data));
3110
3119
  }, Kt = function(e, t) {
3111
3120
  return e instanceof RegExp ? J(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
3112
3121
  }, qt = function(e, t, n) {
3113
- if (!Ne[t] && $t(t) && Kt(C.tagNameCheck, t)) return !1;
3114
- if (Ye && !$e[t] && !$e[la(t)]) {
3122
+ if (!Me[t] && $t(t) && Kt(w.tagNameCheck, t)) return !1;
3123
+ if (E && !et[t] && !et[ua(t)]) {
3115
3124
  let t = ne(e), r = te(e);
3116
3125
  if (r && t) {
3117
3126
  let i = r.length;
@@ -3121,34 +3130,34 @@ function ro() {
3121
3130
  }
3122
3131
  }
3123
3132
  }
3124
- return j(e), !0;
3133
+ return A(e), !0;
3125
3134
  }, Jt = function(e, t, n, r) {
3126
3135
  return e.length === 0 ? t : t === n || t === r ? Z(t) : t;
3127
3136
  }, Yt = function(e, t) {
3128
- return e === t || ne(e) !== null ? !1 : (Xe && At(e), !0);
3137
+ return e === t || ne(e) !== null ? !1 : (Ze && At(e), !0);
3129
3138
  }, Xt = function(e, n) {
3130
- if (It(e), I(b.beforeSanitizeElements, e, null), Yt(e, n)) return !0;
3131
- if (Ut(e)) return j(e), !0;
3132
- let r = A(ce(e));
3133
- if (x = Jt(b.uponSanitizeElement, x, je, Ve), I(b.uponSanitizeElement, e, {
3139
+ if (It(e), I(x.beforeSanitizeElements, e, null), Yt(e, n)) return !0;
3140
+ if (Ut(e)) return A(e), !0;
3141
+ let r = k(se(e));
3142
+ if (S = Jt(x.uponSanitizeElement, S, Ae, He), I(x.uponSanitizeElement, e, {
3134
3143
  tagName: r,
3135
- allowedTags: x
3144
+ allowedTags: S
3136
3145
  }), Yt(e, n)) return !0;
3137
- if (Gt(e, r)) return j(e), !0;
3138
- if (Ne[r] || !(w.tagCheck instanceof Function && w.tagCheck(r)) && !x[r]) {
3146
+ if (Gt(e, r)) return A(e), !0;
3147
+ if (Me[r] || !(Pe.tagCheck instanceof Function && Pe.tagCheck(r)) && !S[r]) {
3139
3148
  let t = qt(e, r, n);
3140
- return t === !1 && (I(b.afterSanitizeElements, e, null), Yt(e, n)) ? !0 : t;
3149
+ return t === !1 && (I(x.afterSanitizeElements, e, null), Yt(e, n)) ? !0 : t;
3141
3150
  }
3142
- if (h(e) === $.element && !Et(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(Ya, e.innerHTML)) return j(e), !0;
3143
- if (E && e.nodeType === $.text) {
3144
- let n = P(e.textContent);
3145
- e.textContent !== n && (na(t.removed, { element: e.cloneNode() }), e.textContent = n);
3151
+ if (g(e) === $.element && !Dt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(Xa, e.innerHTML)) return A(e), !0;
3152
+ if (T && e.nodeType === $.text) {
3153
+ let n = Vt(e.textContent);
3154
+ e.textContent !== n && (ra(t.removed, { element: e.cloneNode() }), e.textContent = n);
3146
3155
  }
3147
- return I(b.afterSanitizeElements, e, null), Yt(e, n);
3156
+ return I(x.afterSanitizeElements, e, null), Yt(e, n);
3148
3157
  }, Zt = function(e, t, r) {
3149
- if (Pe[t] || Lt(t, e) || qe && (t === "id" || t === "name") && (r in n || r in vt)) return !1;
3150
- let i = S[t] || w.attributeCheck instanceof Function && w.attributeCheck(t, e);
3151
- return Ie && J(Te, t) || Fe && J(Ee, t) ? !0 : i ? rt[t] || J(Ae, fa(r, Oe, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && pa(r, "data:") === 0 && tt[e] || Le && !J(De, fa(r, Oe, "")) ? !0 : !r : $t(e) && Kt(C.tagNameCheck, e) && Kt(C.attributeNameCheck, t, e) || t === "is" && C.allowCustomizedBuiltInElements && Kt(C.tagNameCheck, r);
3158
+ if (Ne[t] || Lt(t, e) || Je && (t === "id" || t === "name") && (r in n || r in yt)) return !1;
3159
+ let i = C[t] || Pe.attributeCheck instanceof Function && Pe.attributeCheck(t, e);
3160
+ return Ie && J(we, t) || Fe && J(Te, t) ? !0 : i ? it[t] || J(ke, pa(r, De, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ma(r, "data:") === 0 && nt[e] || Le && !J(Ee, pa(r, De, "")) ? !0 : !r : $t(e) && Kt(w.tagNameCheck, e) && Kt(w.attributeNameCheck, t, e) || t === "is" && w.allowCustomizedBuiltInElements && Kt(w.tagNameCheck, r);
3152
3161
  }, Qt = X({}, [
3153
3162
  "annotation-xml",
3154
3163
  "color-profile",
@@ -3159,45 +3168,45 @@ function ro() {
3159
3168
  "font-face-uri",
3160
3169
  "missing-glyph"
3161
3170
  ]), $t = function(e) {
3162
- return !Qt[la(e)] && J(ke, e);
3171
+ return !Qt[ua(e)] && J(Oe, e);
3163
3172
  }, en = function(e, t, n, r) {
3164
- if (_ && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
3165
- case "TrustedHTML": return me(r);
3166
- case "TrustedScriptURL": return he(r);
3173
+ if (v && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
3174
+ case "TrustedHTML": return pe(r);
3175
+ case "TrustedScriptURL": return me(r);
3167
3176
  }
3168
3177
  return r;
3169
3178
  }, tn = function(e, t, n, r) {
3170
3179
  try {
3171
- return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Ut(e) || (j(e), !1);
3180
+ return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Ut(e) || (A(e), !1);
3172
3181
  } catch {
3173
3182
  return Ot(t, e), !1;
3174
3183
  }
3175
3184
  }, nn = function(e, t) {
3176
- return Re && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : la(e) === "attributename" && da(t, "href") !== null;
3185
+ return ze && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : ua(e) === "attributename" && fa(t, "href") !== null;
3177
3186
  }, rn = function(e, n) {
3178
- if (I(b.beforeSanitizeAttributes, e, null), Yt(e, n)) return;
3187
+ if (I(x.beforeSanitizeAttributes, e, null), Yt(e, n)) return;
3179
3188
  let r = e.attributes;
3180
3189
  if (!r || Ut(e)) return;
3181
- S = Jt(b.uponSanitizeAttribute, S, Me, He);
3190
+ C = Jt(x.uponSanitizeAttribute, C, je, Ue);
3182
3191
  let i = {
3183
3192
  attrName: "",
3184
3193
  attrValue: "",
3185
3194
  keepAttr: !0,
3186
- allowedAttributes: S,
3195
+ allowedAttributes: C,
3187
3196
  forceKeepAttr: void 0
3188
- }, a = r.length, o = A(e.nodeName);
3197
+ }, a = r.length, o = k(e.nodeName);
3189
3198
  for (; a--;) {
3190
- let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = A(s), d = l, f = s === "value" ? d : ma(d), p = !1;
3191
- i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, I(b.uponSanitizeAttribute, e, i), f = i.attrValue, Je && (u === "id" || u === "name") && pa(f, D) !== 0 && (Ot(s, e, n), f = D + f, p = !0), nn(s, f) ? Ot(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !T && J(Xa, f) ? Ot(s, e, n) : (E && (f = P(f)), Zt(o, u, f) ? (f = en(o, u, c, f), f !== d && tn(e, s, c, f) && p && ta(t.removed)) : Ot(s, e, n)) : Ot(s, e, n));
3199
+ let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = k(s), d = l, f = s === "value" ? d : ha(d), p = !1;
3200
+ i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, I(x.uponSanitizeAttribute, e, i), f = i.attrValue, Ye && (u === "id" || u === "name") && ma(f, Xe) !== 0 && (Ot(s, e, n), f = Xe + f, p = !0), nn(s, f) ? Ot(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Re && J(Za, f) ? Ot(s, e, n) : (T && (f = Vt(f)), Zt(o, u, f) ? (f = en(o, u, c, f), f !== d && tn(e, s, c, f) && p && na(t.removed)) : Ot(s, e, n)) : Ot(s, e, n));
3192
3201
  }
3193
- I(b.afterSanitizeAttributes, e, null), Yt(e, n);
3202
+ I(x.afterSanitizeAttributes, e, null), Yt(e, n);
3194
3203
  }, an = function(e) {
3195
3204
  let t = null, n = Bt(e);
3196
- for (I(b.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (I(b.uponSanitizeShadowNode, t, null), Xt(t, e), rn(t, e), F(t.content) && an(t.content), h(t) === $.element) {
3205
+ for (I(x.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (I(x.uponSanitizeShadowNode, t, null), Xt(t, e), rn(t, e), F(t.content) && an(t.content), g(t) === $.element) {
3197
3206
  let e = re(t);
3198
3207
  F(e) && (on(e), an(e));
3199
3208
  }
3200
- E && Ht(e), I(b.afterSanitizeShadowDOM, e, null);
3209
+ T && Ht(e), I(x.afterSanitizeShadowDOM, e, null);
3201
3210
  }, on = function(e) {
3202
3211
  let t = [{
3203
3212
  node: e,
@@ -3209,14 +3218,14 @@ function ro() {
3209
3218
  an(e.shadow);
3210
3219
  continue;
3211
3220
  }
3212
- let n = e.node, r = h(n) === $.element, i = te(n);
3221
+ let n = e.node, r = g(n) === $.element, i = te(n);
3213
3222
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
3214
3223
  node: i[e],
3215
3224
  shadow: null
3216
3225
  });
3217
3226
  if (r) {
3218
- let e = oe ? oe(n) : null;
3219
- if (typeof e == "string" && A(e) === "template") {
3227
+ let e = h ? h(n) : null;
3228
+ if (typeof e == "string" && k(e) === "template") {
3220
3229
  let e = n.content;
3221
3230
  F(e) && t.push({
3222
3231
  node: e,
@@ -3238,25 +3247,25 @@ function ro() {
3238
3247
  };
3239
3248
  return t.sanitize = function(e) {
3240
3249
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
3241
- if (ct = !e, ct && (e = "<!-->"), typeof e != "string" && !Wt(e) && (e = Ca(e), typeof e != "string")) throw ba("dirty is not a string, aborting");
3250
+ if (lt = !e, lt && (e = "<!-->"), typeof e != "string" && !Wt(e) && (e = wa(e), typeof e != "string")) throw xa("dirty is not a string, aborting");
3242
3251
  if (!t.isSupported) return e;
3243
- Be ? (x = Ve, S = He) : bt(n), (b.uponSanitizeElement.length > 0 || b.uponSanitizeAttribute.length > 0) && (x = Z(x)), b.uponSanitizeAttribute.length > 0 && (S = Z(S)), t.removed = [];
3244
- let c = Xe && typeof e != "string" && Wt(e), l = [], u = Ze;
3252
+ Ve ? (S = He, C = Ue) : xt(n), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (S = Z(S)), x.uponSanitizeAttribute.length > 0 && (C = Z(C)), t.removed = [];
3253
+ let c = Ze && typeof e != "string" && Wt(e), l = [], u = Qe;
3245
3254
  if (c) {
3246
3255
  Rt(e);
3247
- let t = ce(e);
3256
+ let t = se(e);
3248
3257
  if (typeof t == "string") {
3249
- let n = A(t);
3250
- if (!x[n] || Ne[n]) throw Dt(e), ba("root node is forbidden and cannot be sanitized in-place");
3258
+ let n = k(t);
3259
+ if (!S[n] || Me[n]) throw M(e), xa("root node is forbidden and cannot be sanitized in-place");
3251
3260
  }
3252
- if (Ut(e)) throw Dt(e), ba("root node is clobbered and cannot be sanitized in-place");
3253
- l = jt(e), Ze = oa();
3261
+ if (Ut(e)) throw M(e), xa("root node is clobbered and cannot be sanitized in-place");
3262
+ l = jt(e), Qe = sa();
3254
3263
  } else if (Wt(e)) i = zt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), on(i);
3255
3264
  else {
3256
- if (!We && !E && !ze && e.indexOf("<") === -1) return _ && Ke ? me(e) : e;
3257
- if (i = zt(e), !i) return We ? null : Ke ? v : "";
3265
+ if (!Ge && !T && !Be && e.indexOf("<") === -1) return v && qe ? pe(e) : e;
3266
+ if (i = zt(e), !i) return Ge ? null : qe ? y : "";
3258
3267
  }
3259
- i && Ue && j(i.firstChild);
3268
+ i && We && A(i.firstChild);
3260
3269
  let d = c ? e : i;
3261
3270
  try {
3262
3271
  c && on(e);
@@ -3264,56 +3273,56 @@ function ro() {
3264
3273
  for (; o = t.nextNode();) Xt(o, d), rn(o, d), F(o.content) && an(o.content);
3265
3274
  c && Pt(e, l);
3266
3275
  } catch (t) {
3267
- throw c && (Dt(e), Nt(e, l)), t;
3276
+ throw c && (M(e), Nt(e, l)), t;
3268
3277
  } finally {
3269
- Ze = u;
3278
+ Qe = u;
3270
3279
  }
3271
3280
  if (c) {
3272
- if (Nt(e, l)) throw ba("a node selected for removal could not be safely returned; refusing to sanitize in place");
3273
- return E && Vt(e), e;
3281
+ if (Nt(e, l)) throw xa("a node selected for removal could not be safely returned; refusing to sanitize in place");
3282
+ return T && P(e), e;
3274
3283
  }
3275
- if (We) {
3276
- if (E && Vt(i), Ge) for (s = ye.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
3284
+ if (Ge) {
3285
+ if (T && P(i), Ke) for (s = ve.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
3277
3286
  else s = i;
3278
- return (S.shadowroot || S.shadowrootmode) && (s = xe.call(r, s, !0)), s;
3287
+ return (C.shadowroot || C.shadowrootmode) && (s = be.call(r, s, !0)), s;
3279
3288
  }
3280
- let f = ze ? i.outerHTML : i.innerHTML;
3281
- return ze && x["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(Ga, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), E && (f = P(f)), _ && Ke ? me(f) : f;
3289
+ let f = Be ? i.outerHTML : i.innerHTML;
3290
+ return Be && S["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(Ka, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), T && (f = Vt(f)), v && qe ? pe(f) : f;
3282
3291
  }, t.setConfig = function() {
3283
3292
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3284
- bt(e), Be = !0, Ve = x, He = S;
3293
+ xt(e), Ve = !0, He = S, Ue = C;
3285
3294
  }, t.clearConfig = function() {
3286
- _t = null, Be = !1, Ve = null, He = null, _ = ue, v = "";
3295
+ vt = null, Ve = !1, He = null, Ue = null, v = le, y = "";
3287
3296
  }, t.isValidAttribute = function(e, t, n) {
3288
- _t || bt({});
3289
- let r = A(e), i = A(t);
3290
- return typeof n == "string" && (nn(t, n) || !T && J(Xa, n)) ? !1 : Zt(r, i, n);
3297
+ vt || xt({});
3298
+ let r = k(e), i = k(t);
3299
+ return typeof n == "string" && (nn(t, n) || !Re && J(Za, n)) ? !1 : Zt(r, i, n);
3291
3300
  }, t.addHook = function(e, t) {
3292
- typeof t == "function" && q(b, e) && na(b[e], t);
3301
+ typeof t == "function" && q(x, e) && ra(x[e], t);
3293
3302
  }, t.removeHook = function(e, t) {
3294
- if (q(b, e)) {
3303
+ if (q(x, e)) {
3295
3304
  if (t !== void 0) {
3296
- let n = ea(b[e], t);
3297
- return n === -1 ? void 0 : ia(b[e], n, 1)[0];
3305
+ let n = ta(x[e], t);
3306
+ return n === -1 ? void 0 : aa(x[e], n, 1)[0];
3298
3307
  }
3299
- return ta(b[e]);
3308
+ return na(x[e]);
3300
3309
  }
3301
3310
  }, t.removeHooks = function(e) {
3302
- q(b, e) && (b[e] = []);
3311
+ q(x, e) && (x[e] = []);
3303
3312
  }, t.removeAllHooks = function() {
3304
- b = eo();
3313
+ x = to();
3305
3314
  }, t;
3306
3315
  }
3307
- var io = ro();
3316
+ var ao = io();
3308
3317
  //#endregion
3309
3318
  //#region ../../packages/components/src/chat/markdownHtml.ts
3310
- function ao(e) {
3319
+ function oo(e) {
3311
3320
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3312
3321
  }
3313
- function oo(e, t) {
3322
+ function so(e, t) {
3314
3323
  return `<span class="katex-pending" data-katex="${encodeURIComponent(e)}" data-display="${t}"></span>`;
3315
3324
  }
3316
- var so = {
3325
+ var co = {
3317
3326
  ADD_ATTR: ["target"],
3318
3327
  ALLOW_UNKNOWN_PROTOCOLS: !0,
3319
3328
  FORBID_TAGS: [
@@ -3334,21 +3343,21 @@ var so = {
3334
3343
  "background"
3335
3344
  ]
3336
3345
  };
3337
- io.addHook("uponSanitizeAttribute", (e, t) => {
3346
+ ao.addHook("uponSanitizeAttribute", (e, t) => {
3338
3347
  t.attrName === "src" && e.nodeName !== "IMG" && (t.keepAttr = !1);
3339
3348
  });
3340
- var co = "data-held-src";
3341
- function lo(e, t) {
3342
- if (!t) return io.sanitize(e, so);
3343
- let n = io.sanitize(e, {
3344
- ...so,
3349
+ var lo = "data-held-src";
3350
+ function uo(e, t) {
3351
+ if (!t) return ao.sanitize(e, co);
3352
+ let n = ao.sanitize(e, {
3353
+ ...co,
3345
3354
  RETURN_DOM_FRAGMENT: !0
3346
3355
  });
3347
3356
  for (let e of Array.from(n.querySelectorAll("img"))) {
3348
3357
  let n = e.getAttribute("src") ?? "";
3349
3358
  if (t.canLoad(n)) continue;
3350
3359
  let r = e.ownerDocument.createElement("button");
3351
- r.type = "button", r.className = "markdown-held-image", r.setAttribute(co, n), r.textContent = t.label(t.hostOf(n) ?? n), e.replaceWith(r);
3360
+ r.type = "button", r.className = "markdown-held-image", r.setAttribute(lo, n), r.textContent = t.label(t.hostOf(n) ?? n), e.replaceWith(r);
3352
3361
  }
3353
3362
  let r = n.ownerDocument.createElement("div");
3354
3363
  return r.append(n), r.innerHTML;
@@ -3356,7 +3365,7 @@ function lo(e, t) {
3356
3365
  //#endregion
3357
3366
  //#region ../../packages/components/src/chat/PkStreamingMarkdown.vue?vue&type=script&setup=true&lang.ts
3358
3367
  a(), c();
3359
- var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3368
+ var fo = ["innerHTML"], po = 100, mo = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3360
3369
  __name: "PkStreamingMarkdown",
3361
3370
  props: {
3362
3371
  markdown: {
@@ -3389,11 +3398,11 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3389
3398
  function ie() {
3390
3399
  return m ||= import("./dist-BK6ru3gS.js"), m;
3391
3400
  }
3392
- let oe = null;
3393
- function se() {
3394
- return oe ||= import("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.mjs").then((e) => e.default), oe;
3401
+ let h = null;
3402
+ function oe() {
3403
+ return h ||= import("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.mjs").then((e) => e.default), h;
3395
3404
  }
3396
- let h = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:\uFF1F\uFF01\u3002\uFF0C\uFF1A]|$)/, le = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;
3405
+ let g = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:\uFF1F\uFF01\u3002\uFF0C\uFF1A]|$)/, ce = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;
3397
3406
  W.use({ extensions: [{
3398
3407
  name: "inlineKatex",
3399
3408
  level: "inline",
@@ -3402,7 +3411,7 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3402
3411
  if (t !== -1 && (t === 0 || e.charAt(t - 1) === " ")) return t;
3403
3412
  },
3404
3413
  tokenizer(e) {
3405
- let t = e.match(h);
3414
+ let t = e.match(g);
3406
3415
  if (t) return {
3407
3416
  type: "inlineKatex",
3408
3417
  raw: t[0],
@@ -3411,13 +3420,13 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3411
3420
  };
3412
3421
  },
3413
3422
  renderer(e) {
3414
- return oo(e.text, e.displayMode);
3423
+ return so(e.text, e.displayMode);
3415
3424
  }
3416
3425
  }, {
3417
3426
  name: "blockKatex",
3418
3427
  level: "block",
3419
3428
  tokenizer(e) {
3420
- let t = e.match(le);
3429
+ let t = e.match(ce);
3421
3430
  if (t) return {
3422
3431
  type: "blockKatex",
3423
3432
  raw: t[0],
@@ -3426,7 +3435,7 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3426
3435
  };
3427
3436
  },
3428
3437
  renderer(e) {
3429
- return oo(e.text, e.displayMode) + "\n";
3438
+ return so(e.text, e.displayMode) + "\n";
3430
3439
  }
3431
3440
  }] }), W.use({ extensions: [{
3432
3441
  name: "thinking",
@@ -3447,30 +3456,30 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3447
3456
  return `<div class="thinking-block">${this.parser.parse(e.tokens ?? [])}</div>`;
3448
3457
  }
3449
3458
  }] });
3450
- let g = new W.Renderer(), _ = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), v = /^(?:javascript|data|vbscript|file):/i, ue = !1, de = (e) => _(e.replace(/^https?:\/\/(?:www\.)?/i, "").replace(/\/$/, "")).replace(/\//g, "/<wbr>");
3451
- g.link = function({ href: e, title: t, text: n, tokens: r }) {
3459
+ let _ = new W.Renderer(), v = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), y = /^(?:javascript|data|vbscript|file):/i, le = !1, ue = (e) => v(e.replace(/^https?:\/\/(?:www\.)?/i, "").replace(/\/$/, "")).replace(/\//g, "/<wbr>");
3460
+ _.link = function({ href: e, title: t, text: n, tokens: r }) {
3452
3461
  let i = this.parser.parseInline(r), a = (e ?? "").trim().replace(/[\x00-\x1f]/g, "");
3453
- if (!a || v.test(a)) return i;
3454
- let o = ue && n === a, s = t || (o ? a : ""), c = s ? ` title="${_(s)}"` : "", l = te(a) ? "" : " target=\"_blank\" rel=\"noopener noreferrer\"";
3455
- return `<a href="${_(a)}"${c}${l}>${o ? de(a) : i}</a>`;
3456
- }, g.table = function(e) {
3457
- ue = !0;
3462
+ if (!a || y.test(a)) return i;
3463
+ let o = le && n === a, s = t || (o ? a : ""), c = s ? ` title="${v(s)}"` : "", l = te(a) ? "" : " target=\"_blank\" rel=\"noopener noreferrer\"";
3464
+ return `<a href="${v(a)}"${c}${l}>${o ? ue(a) : i}</a>`;
3465
+ }, _.table = function(e) {
3466
+ le = !0;
3458
3467
  try {
3459
- let t = e.header.map((e) => _(this.parser.parseInline(e.tokens, this.parser.textRenderer))), n = (e) => `<tr role="row">${e.map((e, n) => {
3468
+ let t = e.header.map((e) => v(this.parser.parseInline(e.tokens, this.parser.textRenderer))), n = (e) => `<tr role="row">${e.map((e, n) => {
3460
3469
  let r = this.parser.parseInline(e.tokens), i = e.align ? ` align="${e.align}"` : "";
3461
3470
  return e.header ? `<th role="columnheader"${i}>${r}</th>` : `<td role="cell" data-label="${t[n] ?? ""}"${i}><span>${r}</span></td>`;
3462
3471
  }).join("")}</tr>`, r = e.rows.length ? `<tbody role="rowgroup">${e.rows.map(n).join("")}</tbody>` : "";
3463
3472
  return `<div class="table-wrapper u-table-scroll"><table class="${e.header.length >= 3 && e.rows.length ? "u-table u-table--stack" : "u-table"}" role="table"><thead role="rowgroup">${n(e.header)}</thead>${r}</table></div>\n`;
3464
3473
  } finally {
3465
- ue = !1;
3474
+ le = !1;
3466
3475
  }
3467
3476
  };
3468
- let fe = /^(sequenceDiagram|graph|classDiagram|stateDiagram|erDiagram|flowchart|xychart-beta)/;
3469
- g.code = ({ text: e }) => fe.test(e) ? `<pre class="mermaid">${ao(e)}</pre>` : `<pre><code>${ao(e)}</code></pre>`;
3470
- function pe(e) {
3477
+ let de = /^(sequenceDiagram|graph|classDiagram|stateDiagram|erDiagram|flowchart|xychart-beta)/;
3478
+ _.code = ({ text: e }) => de.test(e) ? `<pre class="mermaid">${oo(e)}</pre>` : `<pre><code>${oo(e)}</code></pre>`;
3479
+ function fe(e) {
3471
3480
  return e.replace(/\\\[([\s\S]*?)\\\]/g, (e, t) => `$$${t}$$`).replace(/\\\(([\s\S]*?)\\\)/g, (e, t) => `$${t}$`).replace(/^(\d+)\.(?!\s)/gm, "$1\\.");
3472
3481
  }
3473
- function me(e) {
3482
+ function pe(e) {
3474
3483
  let t = /* @__PURE__ */ new Set(), n = /^(`{3,}|~{3,})[^\n]*\n([\s\S]*?)\n\1/gm, r;
3475
3484
  for (; (r = n.exec(e)) !== null;) for (let e = r.index; e < r.index + r[0].length; e++) t.add(e);
3476
3485
  return e.replace(/[{[]([\s\S]*?)[}\]]/g, (e, n, r) => {
@@ -3482,31 +3491,31 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3482
3491
  }
3483
3492
  }).replace(/\n{3,}/g, "\n\n");
3484
3493
  }
3485
- let he = [
3486
- ce,
3487
- me,
3488
- Jn,
3489
- pe
3490
- ], y = n("container"), ge = ne(d(a, "markdown"), fo), _e = l(() => a.tailLength ? Se(ge.value, a.tailLength) : ge.value), { resolveText: ve } = re(), ye = ve(_e), be = ae(), xe = l(() => {
3491
- let e = he.reduce((e, t) => t(e), ye.value);
3492
- return lo(W.parse(e, {
3494
+ let me = [
3495
+ se,
3496
+ pe,
3497
+ Yn,
3498
+ fe
3499
+ ], b = n("container"), he = ne(d(a, "markdown"), po), ge = l(() => a.tailLength ? xe(he.value, a.tailLength) : he.value), { resolveText: _e } = re(), ve = _e(ge), ye = ae(), be = l(() => {
3500
+ let e = me.reduce((e, t) => t(e), ve.value);
3501
+ return uo(W.parse(e, {
3493
3502
  async: !1,
3494
3503
  breaks: !0,
3495
- renderer: g
3496
- }), be.isGated.value ? {
3497
- canLoad: be.canLoad,
3498
- hostOf: be.hostOf,
3504
+ renderer: _
3505
+ }), ye.isGated.value ? {
3506
+ canLoad: ye.canLoad,
3507
+ hostOf: ye.hostOf,
3499
3508
  label: (e) => c("label.imageHeld", { host: e })
3500
3509
  } : void 0);
3501
3510
  });
3502
- function b(e) {
3503
- let t = (e.target?.closest?.(`[${co}]`))?.getAttribute(co);
3504
- t && (e.preventDefault(), e.stopPropagation(), be.release(t));
3511
+ function x(e) {
3512
+ let t = (e.target?.closest?.(`[${lo}]`))?.getAttribute(lo);
3513
+ t && (e.preventDefault(), e.stopPropagation(), ye.release(t));
3505
3514
  }
3506
- async function Ce() {
3515
+ async function Se() {
3507
3516
  if (a.loading) return;
3508
3517
  await i();
3509
- let e = y.value?.querySelectorAll("pre.mermaid:not([data-rendered])");
3518
+ let e = b.value?.querySelectorAll("pre.mermaid:not([data-rendered])");
3510
3519
  if (!e?.length) return;
3511
3520
  let { renderMermaidSVG: t, THEMES: n } = await ie(), r = a.isDark ? n["github-dark"] : n["github-light"];
3512
3521
  for (let n of Array.from(e)) {
@@ -3518,19 +3527,19 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3518
3527
  } catch {}
3519
3528
  }
3520
3529
  }
3521
- async function we() {
3530
+ async function Ce() {
3522
3531
  await i();
3523
- let e = y.value?.querySelectorAll("pre:not(.mermaid) > code:not([data-highlighted])");
3532
+ let e = b.value?.querySelectorAll("pre:not(.mermaid) > code:not([data-highlighted])");
3524
3533
  if (!e?.length) return;
3525
3534
  let t = (await import("https://cdn.jsdelivr.net/npm/highlight.js@11/es/common.js")).default;
3526
3535
  for (let n of e) t.highlightElement(n), n.setAttribute("data-highlighted", "true");
3527
3536
  }
3528
- async function Te() {
3537
+ async function we() {
3529
3538
  await i();
3530
- let e = y.value?.querySelectorAll(".katex-pending");
3539
+ let e = b.value?.querySelectorAll(".katex-pending");
3531
3540
  if (!e?.length) return;
3532
- let t = await se();
3533
- p("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.min.css", ee(y.value));
3541
+ let t = await oe();
3542
+ p("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.min.css", ee(b.value));
3534
3543
  for (let n of Array.from(e)) {
3535
3544
  if (!n.isConnected) continue;
3536
3545
  let e = n.dataset.katex;
@@ -3544,9 +3553,9 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3544
3553
  } catch {}
3545
3554
  }
3546
3555
  }
3547
- async function Ee() {
3556
+ async function Te() {
3548
3557
  await i();
3549
- let e = y.value?.querySelectorAll("pre.mermaid[data-rendered]");
3558
+ let e = b.value?.querySelectorAll("pre.mermaid[data-rendered]");
3550
3559
  if (!e?.length) return;
3551
3560
  let { renderMermaidSVG: t, THEMES: n } = await ie(), r = a.isDark ? n["github-dark"] : n["github-light"];
3552
3561
  for (let n of Array.from(e)) {
@@ -3557,7 +3566,7 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3557
3566
  } catch {}
3558
3567
  }
3559
3568
  }
3560
- function De(e) {
3569
+ function Ee(e) {
3561
3570
  let t = e.target;
3562
3571
  if (!(t instanceof HTMLImageElement) || t.dataset.broken) return;
3563
3572
  t.dataset.broken = "true";
@@ -3565,60 +3574,60 @@ var uo = ["innerHTML"], fo = 100, po = /*#__PURE__*/ ie(/* @__PURE__ */ e({
3565
3574
  n.className = "markdown-broken-image", n.textContent = t.alt || c("label.imageLoadError"), n.title = t.src, t.replaceWith(n);
3566
3575
  }
3567
3576
  t(() => {
3568
- y.value?.addEventListener("error", De, !0);
3577
+ b.value?.addEventListener("error", Ee, !0);
3569
3578
  }), o(() => {
3570
- y.value?.removeEventListener("error", De, !0);
3571
- }), s([xe, () => a.loading], Ce, { immediate: !0 }), s(() => a.isDark, Ee), s(xe, we, { immediate: !0 }), s(xe, Te, { immediate: !0 });
3572
- let Oe = 0;
3573
- function ke(e, t) {
3579
+ b.value?.removeEventListener("error", Ee, !0);
3580
+ }), s([be, () => a.loading], Se, { immediate: !0 }), s(() => a.isDark, Te), s(be, Ce, { immediate: !0 }), s(be, we, { immediate: !0 });
3581
+ let De = 0;
3582
+ function Oe(e, t) {
3574
3583
  let n = document.createElement("span");
3575
3584
  return n.style.cssText = `animation:ft-${a.animation} ${a.animationDuration} ease-out ${t}ms both;display:inline-block`, n.textContent = e, n.addEventListener("animationend", () => {
3576
3585
  let t = n.parentNode;
3577
3586
  t && (t.replaceChild(document.createTextNode(e), n), t.normalize());
3578
3587
  }, { once: !0 }), n;
3579
3588
  }
3580
- function Ae(e, t, n, r) {
3589
+ function ke(e, t, n, r) {
3581
3590
  let i = r, a = e.split(/(\s+)/);
3582
- for (let e of a) e && (/^\s+$/.test(e) ? t.insertBefore(document.createTextNode(e), n) : (t.insertBefore(ke(e, i * 30), n), i++));
3591
+ for (let e of a) e && (/^\s+$/.test(e) ? t.insertBefore(document.createTextNode(e), n) : (t.insertBefore(Oe(e, i * 30), n), i++));
3583
3592
  return i;
3584
3593
  }
3585
- function x(e) {
3594
+ function S(e) {
3586
3595
  let t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, { acceptNode(e) {
3587
3596
  return e.parentElement?.closest("pre, code, .katex-pending, .markdown-broken-image") ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3588
3597
  } }), n = [];
3589
3598
  for (; t.nextNode();) n.push(t.currentNode);
3590
3599
  return n;
3591
3600
  }
3592
- function je() {
3593
- if (!y.value || !a.loading || !a.animation) return;
3594
- let e = x(y.value), t = 0, n = 0;
3601
+ function Ae() {
3602
+ if (!b.value || !a.loading || !a.animation) return;
3603
+ let e = S(b.value), t = 0, n = 0;
3595
3604
  for (let r of e) {
3596
3605
  let e = r.textContent || "", i = t, a = t + e.length;
3597
- if (t = a, a <= Oe) continue;
3606
+ if (t = a, a <= De) continue;
3598
3607
  let o = r.parentNode;
3599
3608
  if (!o) continue;
3600
- if (i >= Oe) {
3609
+ if (i >= De) {
3601
3610
  let t = r.nextSibling;
3602
- o.removeChild(r), n = Ae(e, o, t, n);
3611
+ o.removeChild(r), n = ke(e, o, t, n);
3603
3612
  continue;
3604
3613
  }
3605
- let s = Oe - i, c = r.splitText(s), l = c.textContent || "", u = c.nextSibling;
3606
- o.removeChild(c), n = Ae(l, o, u, n);
3614
+ let s = De - i, c = r.splitText(s), l = c.textContent || "", u = c.nextSibling;
3615
+ o.removeChild(c), n = ke(l, o, u, n);
3607
3616
  }
3608
- Oe = t;
3617
+ De = t;
3609
3618
  }
3610
- return s(xe, async () => {
3611
- await i(), je();
3619
+ return s(be, async () => {
3620
+ await i(), Ae();
3612
3621
  }, { immediate: !0 }), s(() => a.markdown, (e, t) => {
3613
- (!e || t && e.length < t.length) && (Oe = 0);
3622
+ (!e || t && e.length < t.length) && (De = 0);
3614
3623
  }), (e, t) => (r(), u("div", {
3615
3624
  ref: "container",
3616
- onClick: b,
3617
- innerHTML: xe.value
3618
- }, null, 8, uo));
3625
+ onClick: x,
3626
+ innerHTML: be.value
3627
+ }, null, 8, fo));
3619
3628
  }
3620
3629
  }), [["styles", [".markdown-held-image{max-width:100%;padding:var(--spacing-4) var(--spacing-8);border:var(--border) dashed var(--color-surface-4);border-radius:var(--rounded-md);background-color:var(--color-surface-1);color:var(--color-word-3);font:inherit;font-size:var(--text-12);vertical-align:middle;cursor:pointer;align-items:center;display:inline-flex}.markdown-held-image:hover,.markdown-held-image:focus-visible{background-color:var(--color-surface-2);color:var(--color-word-2)}.markdown-broken-image{align-items:center;gap:var(--spacing-4);max-width:100%;padding:var(--spacing-4) var(--spacing-8);border:var(--border) dashed var(--color-surface-4);border-radius:var(--rounded-md);background-color:var(--color-surface-1);color:var(--color-word-4);font-size:var(--text-12);vertical-align:middle;display:inline-flex}@keyframes ft-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes ft-blurIn{0%{opacity:0;filter:blur(4px)}to{opacity:1;filter:blur()}}@keyframes ft-dropIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes ft-slideUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes ft-fadeAndScale{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}"]]]);
3621
3630
  //#endregion
3622
- export { pe as A, x as C, me as D, de as E, g as M, fe as N, _ as O, ve as S, ue as T, Ie as _, ge as a, Ee as b, Pe as c, Re as d, ke as f, Me as g, E as h, w as i, le as j, v as k, Ne as l, ze as m, Te as n, ye as o, Oe as p, xe as r, C as s, po as t, je as u, De as v, S as w, he as x, be as y };
3631
+ export { y as A, _e as C, ue as D, le as E, ce as M, _ as N, pe as O, de as P, me as S, je as T, w as _, Ae as a, ye as b, Me as c, C as d, Be as f, ze as g, Ve as h, Fe as i, fe as j, v as k, Pe as l, De as m, we as n, he as o, Oe as p, be as r, ve as s, mo as t, Ne as u, Le as v, S as w, Te as x, Ee as y };
3623
3632
 
3624
- //# sourceMappingURL=PkStreamingMarkdown--CcBvs19.js.map
3633
+ //# sourceMappingURL=PkStreamingMarkdown-Bry3y6Ru.js.map